File tree 2 files changed +18
-0
lines changed
packages/@angular/cli/tasks
tests/e2e/tests/commands/new
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ export default Task.extend({
51
51
const project = this . project ;
52
52
const packageName = commandOptions . name !== '.' && commandOptions . name || project . name ( ) ;
53
53
54
+ if ( commandOptions . style === undefined ) {
55
+ commandOptions . style = CliConfig . fromGlobal ( ) . get ( 'defaults.styleExt' ) ;
56
+ }
57
+
54
58
if ( ! packageName ) {
55
59
const message = 'The `ng ' + this . name + '` command requires a ' +
56
60
'package.json in current folder with name attribute or a specified name via arguments. ' +
Original file line number Diff line number Diff line change
1
+ import { ng } from '../../../utils/process' ;
2
+ import { createProject } from '../../../utils/project' ;
3
+ import { expectFileToExist } from '../../../utils/fs' ;
4
+
5
+
6
+ export default function ( ) {
7
+ return Promise . resolve ( )
8
+ . then ( ( ) => ng ( 'set' , 'defaults.styleExt' , 'scss' ) )
9
+ . then ( ( ) => createProject ( 'style-project' ) )
10
+ . then ( ( ) => expectFileToExist ( 'src/app/app.component.scss' ) )
11
+
12
+ // Try to run the unit tests.
13
+ . then ( ( ) => ng ( 'test' , '--single-run' ) ) ;
14
+ }
You can’t perform that action at this time.
0 commit comments