scripts/generator.js
function execDependencyInstall () {

	console.log('\nExecuting npm install command...');

	return new Promise(function(resolve, reject){

		var child = require('child_process').spawn('npm', ['install'], {
			cwd: process.cwd,
			detached: false,
			env: process.env,
			stdio: [process.stdin, process.stdout, process.stderr]
		});

		child.on('error', function (error) {
			console.error(colors.bold.red('ERROR: Could not install the required modules:'));
			console.error(error.stack.toString());
			process.exit(255);
		});

		child.on('close', function (exit_code) {
			if (exit_code !== 0) {
				console.error(colors.bold.red('\nERROR: npm install has been failed.'));
				process.exit(255);
			}
			console.log('\nnpm install has been completed.\n\n');
			resolve(true);
		});

	});

}
function execDependencyInstall () {

	console.log('\nExecuting npm install command...');

	return new Promise(function(resolve, reject){

		var child = require('child_process').spawn('npm', ['install'], {
			cwd: process.cwd,
			detached: false,
			env: process.env,
			stdio: [process.stdin, process.stdout, process.stderr]
		});

		child.on('error', function (error) {
			console.error(colors.bold.red('ERROR: Could not install the required modules:'));
			console.error(error.stack.toString());
			process.exit(255);
		});

		child.on('close', function (exit_code) {
			if (exit_code !== 0) {
				console.error(colors.bold.red('\nERROR: npm install has been failed.'));
				process.exit(255);
			}
			console.log('\nnpm install has been completed.\n\n');
			resolve(true);
		});

	});

}
function execDependencyInstall ( ) { console . log ( '\nExecuting npm install command...' ) ; return new Promise ( function ( resolve , reject ) { var child = require ( 'child_process' ) . spawn ( 'npm' , [ 'install' ] , { cwd : process . cwd , detached : false , env : process . env , stdio : [ process . stdin , process . stdout , process . stderr ] } ) ; child . on ( 'error' , function ( error ) { console . error ( colors . bold . red ( 'ERROR: Could not install the required modules:' ) ) ; console . error ( error . stack . toString ( ) ) ; process . exit ( 255 ) ; } ) ; child . on ( 'close' , function ( exit_code ) { if ( exit_code !== 0 ) { console . error ( colors . bold . red ( '\nERROR: npm install has been failed.' ) ) ; process . exit ( 255 ) ; } console . log ( '\nnpm install has been completed.\n\n' ) ; resolve ( true ) ; } ) ; } ) ; }
Install the dependency modules with using npm command
@return {Boolean} Whether the install has been successful
Install the dependency modules with using npm command