File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#!/usr/bin/env node
2-
3- const cp = require ( "child_process" ) ;
4- const inquirer = require ( "inquirer" ) ;
5-
62function runCommand ( command , options ) {
3+ const cp = require ( "child_process" ) ;
74 return new Promise ( ( resolve , reject ) => {
85 const executedCommand = cp . spawn ( command , options , {
96 stdio : "inherit"
3431if ( ! webpackCliInstalled ) {
3532 const path = require ( "path" ) ;
3633 const fs = require ( "fs" ) ;
34+ const inquirer = require ( "inquirer" ) ;
3735 const isYarn = fs . existsSync ( path . resolve ( process . cwd ( ) , "yarn.lock" ) ) ;
3836
3937 let packageManager ;
@@ -51,7 +49,9 @@ if (!webpackCliInstalled) {
5149 const question = {
5250 type : "confirm" ,
5351 name : "shouldInstall" ,
54- message : `Would you like to install webpack-cli? (That will run ${ commandToBeRun } )` ,
52+ message : `Would you like to install webpack-cli? (That will run ${
53+ commandToBeRun
54+ } )`,
5555 default : true
5656 } ;
5757
You can’t perform that action at this time.
0 commit comments