Skip to content

Commit 9718139

Browse files
committed
[WIP] add devserver alias
1 parent 8b1ee49 commit 9718139

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

bin/config-yargs.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,11 @@ module.exports = function(yargs) {
5353
describe: "Generates a new webpack plugin project",
5454
group: INIT_GROUP
5555
},
56-
56+
serve: {
57+
type: "boolean",
58+
describe: "Runs your project on a local server",
59+
group: INIT_GROUP
60+
},
5761
config: {
5862
type: "string",
5963
describe: "Path to the config file",

bin/webpack.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ const NON_COMPILATION_ARGS = [
1717
"remove",
1818
"update",
1919
"generate-loader",
20-
"generate-plugin"
20+
"generate-plugin",
21+
"serve"
2122
];
2223

2324
const NON_COMPILATION_CMD = process.argv.find(arg => {

lib/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ module.exports = function initialize(command, args) {
4141
case "update": {
4242
return require("./commands/update")();
4343
}
44+
case "serve": {
45+
// TODO: prompt, then install devserver
46+
}
4447
case "generate-loader": {
4548
return require("./generate-loader/index.js")();
4649
}

0 commit comments

Comments
 (0)