1.1.4 • Published 8 years ago

exec-sync-uc v1.1.4

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

npm version Build Status

exec-sync-uc

Usage 1

// native execSync
const nativeExecSync = require('child_process').execSync;
nativeExecSync('cat *.js ' + bad_file + ' | wc -l');

// is equivalent to
const execSync = require('exec-sync-uc');
const PIPE = '|';
execSync([ 'cat *.js', bad_file, PIPE, 'wc -l' ]);

Usage 2

const NPM = '/home/ubuntu/.nvm/versions/node/v4.2.6/bin/npm';
const DIR_NAME = 'SOME_DIR_PATH';
const zip_file = process.argv[2];

execSync(['rm', '-rf', DIR_NAME ]);

execSync('unzip'+ zip_file +' -d'+ DIR_NAME );
// It's hard to find problem by `whitespace`, let's use below

execSync(['unzip', zip_file, '-d', DIR_NAME ]);
execSync([ NPM, 'install', '--production'], { cwd: DIR_NAME });
1.1.4

8 years ago

1.1.3

8 years ago

1.1.2

8 years ago

1.1.1

8 years ago

1.1.0

8 years ago

1.0.0

8 years ago