@@ -49,12 +49,12 @@ function addTsProjectReference(...paths: string[]) {
49
49
}
50
50
51
51
export default function ( options : ApplicationOptions ) : Rule {
52
- return async ( host : Tree , context : SchematicContext ) => {
52
+ return async ( host : Tree ) => {
53
53
const { appDir, appRootSelector, componentOptions, folderName, sourceDir } =
54
54
await getAppOptions ( host , options ) ;
55
55
56
56
return chain ( [
57
- addAppToWorkspaceFile ( options , appDir , folderName ) ,
57
+ addAppToWorkspaceFile ( options , appDir ) ,
58
58
addTsProjectReference ( './' + join ( normalize ( appDir ) , 'tsconfig.app.json' ) ) ,
59
59
options . skipTests || options . minimal
60
60
? noop ( )
@@ -157,6 +157,14 @@ function addDependenciesToPackageJson(options: ApplicationOptions) {
157
157
} ) ;
158
158
}
159
159
160
+ if ( options . style === Style . Less ) {
161
+ addPackageJsonDependency ( host , {
162
+ type : NodeDependencyType . Dev ,
163
+ name : 'less' ,
164
+ version : latestVersions [ 'less' ] ,
165
+ } ) ;
166
+ }
167
+
160
168
if ( ! options . skipInstall ) {
161
169
context . addTask ( new NodePackageInstallTask ( ) ) ;
162
170
}
@@ -165,11 +173,7 @@ function addDependenciesToPackageJson(options: ApplicationOptions) {
165
173
} ;
166
174
}
167
175
168
- function addAppToWorkspaceFile (
169
- options : ApplicationOptions ,
170
- appDir : string ,
171
- folderName : string ,
172
- ) : Rule {
176
+ function addAppToWorkspaceFile ( options : ApplicationOptions , appDir : string ) : Rule {
173
177
let projectRoot = appDir ;
174
178
if ( projectRoot ) {
175
179
projectRoot += '/' ;
0 commit comments