11import { CliConfig } from '../models/config' ;
22import { BuildOptions } from '../models/build-options' ;
33import { Version } from '../upgrade/version' ;
4+ import { oneLine } from 'common-tags' ;
45
56const Command = require ( '../ember-cli/lib/models/command' ) ;
67
@@ -13,34 +14,101 @@ export const baseBuildCommandOptions: any = [
1314 name : 'target' ,
1415 type : String ,
1516 default : 'development' ,
16- aliases : [ 't' , { 'dev' : 'development' } , { 'prod' : 'production' } ]
17- } ,
18- { name : 'environment' , type : String , aliases : [ 'e' ] } ,
19- { name : 'output-path' , type : 'Path' , aliases : [ 'op' ] } ,
20- { name : 'aot' , type : Boolean } ,
21- { name : 'sourcemap' , type : Boolean , aliases : [ 'sm' , 'sourcemaps' ] } ,
22- { name : 'vendor-chunk' , type : Boolean , default : true , aliases : [ 'vc' ] } ,
23- { name : 'base-href' , type : String , aliases : [ 'bh' ] } ,
24- { name : 'deploy-url' , type : String , aliases : [ 'd' ] } ,
25- { name : 'verbose' , type : Boolean , default : false , aliases : [ 'v' ] } ,
26- { name : 'progress' , type : Boolean , default : true , aliases : [ 'pr' ] } ,
27- { name : 'i18n-file' , type : String } ,
28- { name : 'i18n-format' , type : String } ,
29- { name : 'locale' , type : String } ,
30- { name : 'extract-css' , type : Boolean , aliases : [ 'ec' ] } ,
31- { name : 'watch' , type : Boolean , default : false , aliases : [ 'w' ] } ,
17+ aliases : [ 't' , { 'dev' : 'development' } , { 'prod' : 'production' } ] ,
18+ description : 'Defines the build target.'
19+ } ,
20+ {
21+ name : 'environment' ,
22+ type : String ,
23+ aliases : [ 'e' ] ,
24+ description : 'Defines the build environment.'
25+ } ,
26+ {
27+ name : 'output-path' ,
28+ type : 'Path' ,
29+ aliases : [ 'op' ] ,
30+ description : 'Path where output will be placed.'
31+ } ,
32+ {
33+ name : 'aot' ,
34+ type : Boolean ,
35+ description : 'Build using Ahead of Time compilation.'
36+ } ,
37+ {
38+ name : 'sourcemap' ,
39+ type : Boolean ,
40+ aliases : [ 'sm' , 'sourcemaps' ] ,
41+ description : 'Output sourcemaps.'
42+ } ,
43+ {
44+ name : 'vendor-chunk' ,
45+ type : Boolean ,
46+ default : true ,
47+ aliases : [ 'vc' ] ,
48+ description : 'Use a separate bundle containing only vendor libraries.'
49+ } ,
50+ {
51+ name : 'base-href' ,
52+ type : String ,
53+ aliases : [ 'bh' ] ,
54+ description : 'Base url for the application being built.'
55+ } ,
56+ {
57+ name : 'deploy-url' ,
58+ type : String ,
59+ aliases : [ 'd' ] ,
60+ description : 'URL where files will be deployed.'
61+ } ,
62+ {
63+ name : 'verbose' ,
64+ type : Boolean ,
65+ default : false ,
66+ aliases : [ 'v' ] ,
67+ description : 'Adds more details to output logging.'
68+ } ,
69+ {
70+ name : 'progress' ,
71+ type : Boolean ,
72+ default : true ,
73+ aliases : [ 'pr' ] ,
74+ description : 'Log progress to the console while building.'
75+ } ,
76+ {
77+ name : 'i18n-file' ,
78+ type : String
79+ } ,
80+ {
81+ name : 'i18n-format' ,
82+ type : String
83+ } ,
84+ {
85+ name : 'locale' ,
86+ type : String
87+ } ,
88+ {
89+ name : 'extract-css' ,
90+ type : Boolean ,
91+ aliases : [ 'ec' ] ,
92+ description : 'Extract css from global styles onto css files instead of js ones.'
93+ } ,
94+ {
95+ name : 'watch' ,
96+ type : Boolean , default : false ,
97+ aliases : [ 'w' ] ,
98+ description : 'Run build when files change.'
99+ } ,
32100 {
33101 name : 'output-hashing' ,
34102 type : String ,
35103 values : [ 'none' , 'all' , 'media' , 'bundles' ] ,
36- description : 'define the output filename cache-busting hashing mode' ,
104+ description : 'Define the output filename cache-busting hashing mode. ' ,
37105 aliases : [ 'oh' ]
38106 } ,
39107 {
40108 name : 'poll' ,
41109 type : Number ,
42110 default : pollDefault ,
43- description : 'enable and define the file watching poll time period (milliseconds)'
111+ description : 'Enable and define the file watching poll time period (milliseconds). '
44112 } ,
45113 {
46114 name : 'app' ,
@@ -60,7 +128,13 @@ const BuildCommand = Command.extend({
60128 aliases : [ 'b' ] ,
61129
62130 availableOptions : baseBuildCommandOptions . concat ( [
63- { name : 'stats-json' , type : Boolean , default : false }
131+ {
132+ name : 'stats-json' ,
133+ type : Boolean ,
134+ default : false ,
135+ description : oneLine `Generates a \`stats.json\` file which can be analyzed using tools
136+ such as: \`webpack-bundle-analyzer\` or https://webpack.github.io/analyse.`
137+ }
64138 ] ) ,
65139
66140 run : function ( commandOptions : BuildTaskOptions ) {
0 commit comments