Updated the build modes a bit

canary
WolverinDEV 2020-04-11 11:59:50 +02:00
parent 23a732556f
commit 58dc5da34f
2 changed files with 12 additions and 5 deletions

View File

@ -822,13 +822,16 @@ namespace watcher {
}
export class WebPackWatcher extends Watcher {
constructor() {
private readonly target;
constructor(target: "web" | "client") {
super("WebPack Watcher");
this.target = target;
this.verbose = true;
}
protected start_command(): string[] {
return ["npm", "run", "watch-web"];
return ["npm", "run", "webpack-" + this.target, "--", "--watch"];
}
}
}
@ -870,7 +873,7 @@ async function main_develop(node: boolean, target: "client" | "web", port: numbe
if(flags.indexOf("--no-sass") == -1)
await sasswatcher.start();
const webpackwatcher = new watcher.WebPackWatcher();
const webpackwatcher = new watcher.WebPackWatcher(target);
try {
if(flags.indexOf("--no-webpack") == -1)

View File

@ -13,10 +13,14 @@
"csso": "csso",
"tsc": "tsc",
"start": "npm run compile-project-base && node file.js ndevelop",
"build-web": "webpack --config webpack-web.config.js",
"watch-web": "webpack --watch --config webpack-web.config.js",
"develop-web": "npm run compile-project-base && node file.js develop web",
"build-client": "webpack --config webpack-client.config.js",
"watch-client": "webpack --watch --config webpack-client.config.js",
"develop-client": "npm run compile-project-base && node file.js develop client",
"webpack-web": "webpack --config webpack-web.config.js",
"webpack-client": "webpack --config webpack-client.config.js",
"generate-i18n-gtranslate": "node shared/generate_i18n_gtranslate.js"
},
"author": "TeaSpeak (WolverinDEV)",