Skip to content

Commit 73d36c0

Browse files
matheus1lvasokra
authored andcommitted
Refactor require statements
1 parent 180e2b7 commit 73d36c0

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

bin/webpack.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#!/usr/bin/env node
2-
3-
const cp = require("child_process");
4-
const inquirer = require("inquirer");
5-
62
function 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"
@@ -34,6 +31,7 @@ try {
3431
if (!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

0 commit comments

Comments
 (0)