@ngflow/ng-architect 1.0.6 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/ng-architect/component/files/__componentKebab__.component.html +1 -0
- package/src/ng-architect/component/files/__componentKebab__.component.ts +11 -0
- package/src/ng-architect/component/index.js +2 -1
- package/src/ng-architect/component/index.js.map +1 -1
- package/src/ng-architect/component/index.ts +4 -1
- package/src/ng-architect/service/files/__serviceKebab__/__serviceKebab__.service.ts +3 -26
- package/src/ng-architect/service/index.js +2 -1
- package/src/ng-architect/service/index.js.map +1 -1
- package/src/ng-architect/service/index.ts +4 -2
package/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<p><%= featureKebab %> works!</p>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChangeDetectionStrategy, Component } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Component({
|
|
4
|
+
selector: 'app-<%= featureKebab %>',
|
|
5
|
+
standalone: true,
|
|
6
|
+
imports: [],
|
|
7
|
+
templateUrl: './<%= featureKebab %>.page.html',
|
|
8
|
+
styleUrl: './<%= featureKebab %>.page.scss',
|
|
9
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
10
|
+
})
|
|
11
|
+
export class <%= featurePascal %>Page {}
|
|
@@ -11,7 +11,8 @@ function default_1(options) {
|
|
|
11
11
|
context.logger.info(`✅ Creating component: ${componentPascal} (${componentKebab})`);
|
|
12
12
|
},
|
|
13
13
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
14
|
-
(0, schematics_1.template)({ componentKebab, componentPascal, module: options.module })
|
|
14
|
+
(0, schematics_1.template)({ componentKebab, componentPascal, module: options.module }),
|
|
15
|
+
(0, schematics_1.move)(`src/app/components/${componentKebab}`) // gera os arquivos dentro de src/app/features/<service-kebab>
|
|
15
16
|
]))
|
|
16
17
|
]);
|
|
17
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAaA,4BAgBC;AA7BD,2DAUoC;AACpC,wDAAkE;AAElE,mBAAwB,OAAY;IAClC,MAAM,cAAc,GAAG,IAAA,0BAAW,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,MAAM,eAAe,GAAG,IAAA,2BAAY,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnD,OAAO,IAAA,kBAAK,EAAC;QACX,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;YACzC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,yBAAyB,eAAe,KAAK,cAAc,GAAG,CAAC,CAAC;QACtF,CAAC;QACD,IAAA,sBAAS,EACP,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;YACpB,IAAA,qBAAQ,EAAC,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,CAAC,MAAM,EAAE,CAAC;YACrE,IAAA,iBAAI,EAAC,sBAAsB,cAAc,EAAE,CAAC,CAAC,8DAA8D;SAE5G,CAAC,CACH;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
apply,
|
|
6
6
|
chain,
|
|
7
7
|
mergeWith,
|
|
8
|
+
move,
|
|
8
9
|
template,
|
|
9
10
|
url
|
|
10
11
|
} from '@angular-devkit/schematics';
|
|
@@ -20,7 +21,9 @@ export default function(options: any): Rule {
|
|
|
20
21
|
},
|
|
21
22
|
mergeWith(
|
|
22
23
|
apply(url('./files'), [
|
|
23
|
-
template({ componentKebab, componentPascal, module: options.module })
|
|
24
|
+
template({ componentKebab, componentPascal, module: options.module }),
|
|
25
|
+
move(`src/app/components/${componentKebab}`) // gera os arquivos dentro de src/app/features/<service-kebab>
|
|
26
|
+
|
|
24
27
|
])
|
|
25
28
|
)
|
|
26
29
|
]);
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Rule,
|
|
3
|
-
SchematicContext,
|
|
4
|
-
Tree,
|
|
5
|
-
apply,
|
|
6
|
-
chain,
|
|
7
|
-
mergeWith,
|
|
8
|
-
template,
|
|
9
|
-
url
|
|
10
|
-
} from '@angular-devkit/schematics';
|
|
11
|
-
import { toKebabCase, toPascalCase } from '../../../utils/string-utils';
|
|
1
|
+
import { Injectable } from '@angular/core';
|
|
12
2
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const servicePascal = toPascalCase(options.name);
|
|
16
|
-
|
|
17
|
-
return chain([
|
|
18
|
-
(tree: Tree, context: SchematicContext) => {
|
|
19
|
-
context.logger.info(`✅ Creating service: ${servicePascal} (${serviceKebab})`);
|
|
20
|
-
},
|
|
21
|
-
mergeWith(
|
|
22
|
-
apply(url('./files'), [
|
|
23
|
-
template({ serviceKebab, servicePascal, store: options.store })
|
|
24
|
-
])
|
|
25
|
-
)
|
|
26
|
-
]);
|
|
27
|
-
}
|
|
3
|
+
@Injectable({ providedIn: 'root' })
|
|
4
|
+
export class <%= featurePascal %>Service {}
|
|
@@ -11,7 +11,8 @@ function default_1(options) {
|
|
|
11
11
|
context.logger.info(`✅ Creating service: ${servicePascal} (${serviceKebab})`);
|
|
12
12
|
},
|
|
13
13
|
(0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
|
|
14
|
-
(0, schematics_1.template)({ serviceKebab, servicePascal, store: options.store })
|
|
14
|
+
(0, schematics_1.template)({ serviceKebab, servicePascal, store: options.store }),
|
|
15
|
+
(0, schematics_1.move)(`src/app/${serviceKebab}`) // gera os arquivos dentro de src/app/features/<service-kebab>
|
|
15
16
|
]))
|
|
16
17
|
]);
|
|
17
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAaA,4BAeC;AA5BD,2DAUoC;AACpC,wDAAkE;AAElE,mBAAwB,OAAY;IAClC,MAAM,YAAY,GAAG,IAAA,0BAAW,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,MAAM,aAAa,GAAG,IAAA,2BAAY,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAEjD,OAAO,IAAA,kBAAK,EAAC;QACX,CAAC,KAAW,EAAE,OAAyB,EAAE,EAAE;YACzC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,uBAAuB,aAAa,KAAK,YAAY,GAAG,CAAC,CAAC;QAChF,CAAC;QACD,IAAA,sBAAS,EACP,IAAA,kBAAK,EAAC,IAAA,gBAAG,EAAC,SAAS,CAAC,EAAE;YACpB,IAAA,qBAAQ,EAAC,EAAE,YAAY,EAAE,aAAa,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;YAC/D,IAAA,iBAAI,EAAC,WAAW,YAAY,EAAE,CAAC,CAAC,8DAA8D;SAC/F,CAAC,CACH;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -6,7 +6,8 @@ import {
|
|
|
6
6
|
chain,
|
|
7
7
|
mergeWith,
|
|
8
8
|
template,
|
|
9
|
-
url
|
|
9
|
+
url,
|
|
10
|
+
move
|
|
10
11
|
} from '@angular-devkit/schematics';
|
|
11
12
|
import { toKebabCase, toPascalCase } from '../utils/string-utils';
|
|
12
13
|
|
|
@@ -20,7 +21,8 @@ export default function(options: any): Rule {
|
|
|
20
21
|
},
|
|
21
22
|
mergeWith(
|
|
22
23
|
apply(url('./files'), [
|
|
23
|
-
template({ serviceKebab, servicePascal, store: options.store })
|
|
24
|
+
template({ serviceKebab, servicePascal, store: options.store }),
|
|
25
|
+
move(`src/app/${serviceKebab}`) // gera os arquivos dentro de src/app/features/<service-kebab>
|
|
24
26
|
])
|
|
25
27
|
)
|
|
26
28
|
]);
|