@@ -49,12 +49,12 @@ function addTsProjectReference(...paths: string[]) {
4949}
5050
5151export default function ( options : ApplicationOptions ) : Rule {
52- return async ( host : Tree , context : SchematicContext ) => {
52+ return async ( host : Tree ) => {
5353 const { appDir, appRootSelector, componentOptions, folderName, sourceDir } =
5454 await getAppOptions ( host , options ) ;
5555
5656 return chain ( [
57- addAppToWorkspaceFile ( options , appDir , folderName ) ,
57+ addAppToWorkspaceFile ( options , appDir ) ,
5858 addTsProjectReference ( './' + join ( normalize ( appDir ) , 'tsconfig.app.json' ) ) ,
5959 options . skipTests || options . minimal
6060 ? noop ( )
@@ -157,6 +157,14 @@ function addDependenciesToPackageJson(options: ApplicationOptions) {
157157 } ) ;
158158 }
159159
160+ if ( options . style === Style . Less ) {
161+ addPackageJsonDependency ( host , {
162+ type : NodeDependencyType . Dev ,
163+ name : 'less' ,
164+ version : latestVersions [ 'less' ] ,
165+ } ) ;
166+ }
167+
160168 if ( ! options . skipInstall ) {
161169 context . addTask ( new NodePackageInstallTask ( ) ) ;
162170 }
@@ -165,11 +173,7 @@ function addDependenciesToPackageJson(options: ApplicationOptions) {
165173 } ;
166174}
167175
168- function addAppToWorkspaceFile (
169- options : ApplicationOptions ,
170- appDir : string ,
171- folderName : string ,
172- ) : Rule {
176+ function addAppToWorkspaceFile ( options : ApplicationOptions , appDir : string ) : Rule {
173177 let projectRoot = appDir ;
174178 if ( projectRoot ) {
175179 projectRoot += '/' ;
0 commit comments