Skip to content

Commit

Permalink
[WIP] add devserver alias
Browse files Browse the repository at this point in the history
  • Loading branch information
evenstensberg committed Dec 18, 2017
1 parent 8b1ee49 commit 9718139
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion bin/config-yargs.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,11 @@ module.exports = function(yargs) {
describe: "Generates a new webpack plugin project",
group: INIT_GROUP
},

serve: {
type: "boolean",
describe: "Runs your project on a local server",
group: INIT_GROUP
},
config: {
type: "string",
describe: "Path to the config file",
Expand Down
3 changes: 2 additions & 1 deletion bin/webpack.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const NON_COMPILATION_ARGS = [
"remove",
"update",
"generate-loader",
"generate-plugin"
"generate-plugin",
"serve"
];

const NON_COMPILATION_CMD = process.argv.find(arg => {
Expand Down
3 changes: 3 additions & 0 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ module.exports = function initialize(command, args) {
case "update": {
return require("./commands/update")();
}
case "serve": {
// TODO: prompt, then install devserver
}
case "generate-loader": {
return require("./generate-loader/index.js")();
}
Expand Down

0 comments on commit 9718139

Please sign in to comment.