1
- import { BuildOptions } from '../models/webpack-config' ;
1
+ import { BuildOptions } from '../models/build-options' ;
2
+ import { Version } from '../upgrade/version' ;
2
3
3
4
const Command = require ( '../ember-cli/lib/models/command' ) ;
4
5
@@ -22,7 +23,7 @@ export const BaseBuildCommandOptions: any = [
22
23
{ name : 'i18n-file' , type : String } ,
23
24
{ name : 'i18n-format' , type : String } ,
24
25
{ name : 'locale' , type : String } ,
25
- { name : 'extract-css' , type : Boolean , aliases : [ 'ec' ] } ,
26
+ { name : 'extract-css' , type : Boolean , aliases : [ 'ec' ] } ,
26
27
{
27
28
name : 'output-hashing' ,
28
29
type : String ,
@@ -46,7 +47,19 @@ const BuildCommand = Command.extend({
46
47
] ) ,
47
48
48
49
run : function ( commandOptions : BuildTaskOptions ) {
49
- return require ( './build.run' ) . default . call ( this , commandOptions ) ;
50
+ const project = this . project ;
51
+
52
+ // Check angular version.
53
+ Version . assertAngularVersionIs2_3_1OrHigher ( project . root ) ;
54
+
55
+ const BuildTask = require ( '../tasks/build' ) . default ;
56
+
57
+ const buildTask = new BuildTask ( {
58
+ cliProject : project ,
59
+ ui : this . ui ,
60
+ } ) ;
61
+
62
+ return buildTask . run ( commandOptions ) ;
50
63
}
51
64
} ) ;
52
65
0 commit comments