We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c06c9b6 commit a953e99Copy full SHA for a953e99
1 file changed
packages/schematics/src/lib/security/security.factory.ts
@@ -1,4 +1,4 @@
1
-import { Path } from '@angular-devkit/core';
+import { Path, strings } from '@angular-devkit/core';
2
import { chain, Rule, Tree } from '@angular-devkit/schematics';
3
import { join } from 'path';
4
import { packagesVersion } from '../packagesVersion';
@@ -46,5 +46,11 @@ function updateMain(project: string | undefined): Rule {
46
}
47
48
export function security(options: ISecurityInitializer): Rule {
49
- return chain([updatePackageJson(options.path), updateMain(options.path)]);
+ return (): any => {
50
+ if (!options.path) {
51
+ options.path = '.';
52
+ }
53
+ options.path = strings.dasherize(options.path);
54
+ return chain([updatePackageJson(options.path), updateMain(options.path)]);
55
+ };
56
0 commit comments