diff --git a/bin/config-yargs.js b/bin/config-yargs.js index af4721cb76a..f635d6c46bf 100644 --- a/bin/config-yargs.js +++ b/bin/config-yargs.js @@ -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", diff --git a/bin/webpack.js b/bin/webpack.js index 67f98e38f14..dedea07bb3f 100755 --- a/bin/webpack.js +++ b/bin/webpack.js @@ -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 => { diff --git a/lib/index.js b/lib/index.js index 5923ec0d9be..211a8610c0b 100644 --- a/lib/index.js +++ b/lib/index.js @@ -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")(); }