File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,6 +10,8 @@ module.exports = function(yargs) {
1010 yargs
1111 . help ( "help" )
1212 . alias ( "help" , "h" , "?" )
13+ . version ( )
14+ . alias ( "version" , "v" )
1315 . options ( {
1416 "config" : {
1517 type : "string" ,
@@ -22,12 +24,6 @@ module.exports = function(yargs) {
2224 describe : "Enviroment passed to the config, when it is a function" ,
2325 group : CONFIG_GROUP
2426 } ,
25- "version" : {
26- type : "string" ,
27- describe : "Webpack version" ,
28- alias : "v" ,
29- group : BASIC_GROUP ,
30- } ,
3127 "context" : {
3228 type : "string" ,
3329 describe : "The root directory for resolving entry point and stats" ,
Original file line number Diff line number Diff line change @@ -6,22 +6,10 @@ var interpret = require("interpret");
66var WebpackOptionsDefaulter = require ( "../lib/WebpackOptionsDefaulter" ) ;
77var validateWebpackOptions = require ( "../lib/validateWebpackOptions" ) ;
88
9- module . exports = function ( optimist , argv , convertOptions ) {
9+ module . exports = function ( yargs , argv , convertOptions ) {
1010
1111 var options = [ ] ;
1212
13- // Help
14- if ( argv . help ) {
15- optimist . showHelp ( ) ;
16- process . exit ( 0 ) ; // eslint-disable-line
17- }
18-
19- // Version
20- if ( argv . v || argv . version ) {
21- console . log ( require ( "../package.json" ) . version ) ;
22- process . exit ( 0 ) ; // eslint-disable-line
23- }
24-
2513 // Shortcuts
2614 if ( argv . d ) {
2715 argv . debug = true ;
You can’t perform that action at this time.
0 commit comments