File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 4747 "ts-node" : " ^0.5.5" ,
4848 "tslint" : " ^3.6.0" ,
4949 "typescript" : " ^1.8.10" ,
50- "typings" : " ^0.8.1"
50+ "typings" : " ^0.8.1" <%= stylePackage %>
5151 }
5252}
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ const Blueprint = require('ember-cli/lib/models/blueprint');
22const path = require ( 'path' ) ;
33const stringUtils = require ( 'ember-cli-string-utils' ) ;
44const getFiles = Blueprint . prototype . files ;
5+ const EOL = require ( 'os' ) . EOL ;
56
67module . exports = {
78 description : '' ,
@@ -28,6 +29,17 @@ module.exports = {
2829 const fullAppName = stringUtils . dasherize ( options . entity . name )
2930 . replace ( / - ( .) / g, ( _ , l ) => ' ' + l . toUpperCase ( ) )
3031 . replace ( / ^ ./ , ( l ) => l . toUpperCase ( ) ) ;
32+
33+ var stylePackage = '' ;
34+ switch ( options . style . toLowerCase ( ) ) {
35+ case 'sass' :
36+ case 'scss' :
37+ stylePackage = `,${ EOL } "node-sass": "3.7.0"` ;
38+ break ;
39+ case 'styl' :
40+ stylePackage = `,${ EOL } "stylus": "0.54.5"` ;
41+ break ;
42+ }
3143
3244 return {
3345 htmlComponentName : stringUtils . dasherize ( options . entity . name ) ,
@@ -38,7 +50,8 @@ module.exports = {
3850 prefix : options . prefix ,
3951 styleExt : this . styleExt ,
4052 refToTypings : refToTypings ,
41- isMobile : options . mobile
53+ isMobile : options . mobile ,
54+ stylePackage : stylePackage
4255 } ;
4356 } ,
4457
You can’t perform that action at this time.
0 commit comments