Skip to content

Commit

Permalink
fix(chore): Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesgeorge007 committed Jun 4, 2019
1 parent d2c7ae4 commit 6810182
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions packages/serve/index.ts
Expand Up @@ -31,23 +31,23 @@ interface ConfigType {
};

const npmConfig: ConfigType = {
installCmd: 'install',
dependency: '--save',
devDependency: '--save-dev',
optionalDependency: '--save-optional'
installCmd: "install",
dependency: "--save",
devDependency: "--save-dev",
optionalDependency: "--save-optional"
};

const yarnConfig: ConfigType = {
installCmd: 'add',
dependency: ' ',
devDependency: '--save',
optionalDependency: '--optinal'
installCmd: "add",
dependency: " ",
devDependency: "--save",
optionalDependency: "--optional"
};

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

/**
Expand Down

0 comments on commit 6810182

Please sign in to comment.