File tree 1 file changed +2
-7
lines changed
projects/angular-calendar/schematics/ng-add
1 file changed +2
-7
lines changed Original file line number Diff line number Diff line change 3
3
Rule ,
4
4
SchematicContext ,
5
5
Tree ,
6
- chain ,
6
+ chain
7
7
} from '@angular-devkit/schematics' ;
8
8
import { NodePackageInstallTask } from '@angular-devkit/schematics/tasks' ;
9
9
import { getWorkspace } from '@schematics/angular/utility/config' ;
@@ -102,12 +102,7 @@ function addModuleToImports(options: Schema): Rule {
102
102
context . logger . log ( 'info' , `Add modules imports options...` ) ;
103
103
104
104
const workspace = getWorkspace ( host ) ;
105
- const project = getProjectFromWorkspace (
106
- workspace ,
107
- options . projectName
108
- ? options . projectName
109
- : Object . keys ( workspace [ 'projects' ] ) [ 0 ]
110
- ) ;
105
+ const project = getProjectFromWorkspace ( workspace , options . projectName ) ;
111
106
const mainPath = getProjectMainFile ( project ) ;
112
107
const appModulePath = options . module
113
108
? normalize ( project . root + '/' + options . module )
You can’t perform that action at this time.
0 commit comments