Skip to content

Commit 6810182

Browse files
committedJun 4, 2019
fix(chore): Minor fix
1 parent d2c7ae4 commit 6810182

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed
 

‎packages/serve/index.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,23 @@ interface ConfigType {
3131
};
3232

3333
const npmConfig: ConfigType = {
34-
installCmd: 'install',
35-
dependency: '--save',
36-
devDependency: '--save-dev',
37-
optionalDependency: '--save-optional'
34+
installCmd: "install",
35+
dependency: "--save",
36+
devDependency: "--save-dev",
37+
optionalDependency: "--save-optional"
3838
};
3939

4040
const yarnConfig: ConfigType = {
41-
installCmd: 'add',
42-
dependency: ' ',
43-
devDependency: '--save',
44-
optionalDependency: '--optinal'
41+
installCmd: "add",
42+
dependency: " ",
43+
devDependency: "--save",
44+
optionalDependency: "--optional"
4545
};
4646

4747
const spawnWithArg = (pm: string, cmd: string): SpawnSyncReturns<Buffer> => {
48-
const pmConfig: ConfigType = pm === 'npm' ? npmConfig : yarnConfig;
49-
const options: string[] = [pmConfig['installCmd'], "webpack-dev-server", pmConfig[cmd]];
50-
spawn.sync(pm, options);
48+
const pmConfig: ConfigType = pm === "npm" ? npmConfig : yarnConfig;
49+
const options: string[] = [pmConfig.installCmd, "webpack-dev-server", pmConfig[cmd]];
50+
return spawn.sync(pm, options, {stdio: "inherit"});
5151
};
5252

5353
/**

0 commit comments

Comments
 (0)
Please sign in to comment.