onepoint-new-app
Version:
Easily generate a new fully-equiped React project, optionally with Express & MongoDB.
13 lines (10 loc) • 391 B
JavaScript
// This modules runs commands as if typed into the cli.
const { execSync } = require('child_process')
module.exports = (command, silent) => {
/*
The silent option mute's the commands CLI output except for errors.
This helps keep the CLI looking clean.
*/
const stdio = silent ? ['pipe', 'pipe', 2] : 'inherit' // http://bit.ly/2Z8xzTF
return execSync(command, { stdio })
}