bin/hitchy-pm.js
function installMissing( error, collected ) {
	if ( error ) {
		console.error( `checking dependencies failed: ${error.message}` );

		process.exit( 1 );
		return;
	}

	if ( collected.length < 1 ) {
		postProcess( 0 );
	} else {
		if ( !quiet ) {
			console.error( `installing missing dependencies:\n${collected.map( d => `* ${d}`).join( "\n" )}` );
		}

		const npm = Child.exec( `npm install --no-save ${collected.join( " " )}`, {
			stdio: "pipe",
		} );

		npm.stdout.pipe( process.stdout );
		npm.stderr.pipe( process.stderr );

		npm.on( "exit", postProcess );
	}
}
function installMissing( error, collected ) {
	if ( error ) {
		console.error( `checking dependencies failed: ${error.message}` );

		process.exit( 1 );
		return;
	}

	if ( collected.length < 1 ) {
		postProcess( 0 );
	} else {
		if ( !quiet ) {
			console.error( `installing missing dependencies:\n${collected.map( d => `* ${d}`).join( "\n" )}` );
		}

		const npm = Child.exec( `npm install --no-save ${collected.join( " " )}`, {
			stdio: "pipe",
		} );

		npm.stdout.pipe( process.stdout );
		npm.stderr.pipe( process.stderr );

		npm.on( "exit", postProcess );
	}
}
function installMissing ( error , collected ) { if ( error ) { console . error ( ` ${ error . message } ` ) ; process . exit ( 1 ) ; return ; } if ( collected . length < 1 ) { postProcess ( 0 ) ; } else { if ( ! quiet ) { console . error ( ` \n ${ collected . map ( d => ` ${ d } ` ) . join ( "\n" ) } ` ) ; } const npm = Child . exec ( ` ${ collected . join ( " " ) } ` , { stdio : "pipe" , } ) ; npm . stdout . pipe ( process . stdout ) ; npm . stderr . pipe ( process . stderr ) ; npm . on ( "exit" , postProcess ) ; } }
Installs collected dependencies considered missing or handles provided error.

@param {Error} error encountered error
@param {string[]} collected list of dependencies considered missing
Installs collected dependencies considered missing or handles provided error .