How to use the @absolunet/terminal.terminal.run function in @absolunet/terminal

To help you get started, we’ve selected a few @absolunet/terminal examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github absolunet / nwayo / packages / cli / index.js View on Github external
util.checkUpdate(cliPackageConfig, (error, update) => {
			if (!error) {
				const { terminal } = require('@absolunet/terminal');

				terminal.spacer();

				if (update.current !== update.latest) {
					util.echo(`Update available: ${chalk.dim(update.current)} ${chalk.reset('→')} ${chalk.green(update.latest)}\n\nUpdating...`);
				} else {
					util.echo('No update available\n\nReinstalling...');
				}

				terminal.spacer();
				terminal.run('npm uninstall -g @absolunet/nwayo-cli && npm install -g --no-audit @absolunet/nwayo-cli');

			} else {
				util.exit(error);
			}
		});
github absolunet / nwayo / packages / cli / index.js View on Github external
const npmInstall = () => {
			const fss          = require('@absolunet/fss');
			const { terminal } = require('@absolunet/terminal');

			fss.remove(nodeModules);
			fss.remove(`${root}/package-lock.json`);

			terminal.run(`cd ${root} && npm install --no-audit`);
			util.exit();
		};
github absolunet / nwayo / packages / workflow / cli / install.js View on Github external
const vendorInstall = () => {
	terminal.print(`
		Installing vendors via npm
	`);

	fss.remove(paths.directory.vendorsDependencies);
	fss.remove(`${paths.directory.vendors}/package-lock.json`);

	terminal.run(`cd ${paths.directory.vendors} && npm install --no-audit`);
};