@ngflow/ng-architect 1.0.5 → 1.0.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngflow/ng-architect",
3
- "version": "1.0.5",
3
+ "version": "1.0.8",
4
4
  "description": "Angular schematics to generate files and maintain clean architecture",
5
5
  "scripts": {
6
6
  "build": "tsc -p tsconfig.json",
@@ -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/${componentPascal}/${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":";;AAYA,4BAcC;AA1BD,2DASoC;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;SACtE,CAAC,CACH;KACF,CAAC,CAAC;AACL,CAAC"}
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,eAAe,IAAI,cAAc,EAAE,CAAC,CAAC,8DAA8D;SAE/H,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
- export default function(options: any): Rule {
14
- const serviceKebab = toKebabCase(options.name);
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 {}
@@ -1 +1,19 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
4
+ const schematics_1 = require("@angular-devkit/schematics");
5
+ const string_utils_1 = require("../utils/string-utils");
6
+ function default_1(options) {
7
+ const serviceKebab = (0, string_utils_1.toKebabCase)(options.name);
8
+ const servicePascal = (0, string_utils_1.toPascalCase)(options.name);
9
+ return (0, schematics_1.chain)([
10
+ (_tree, context) => {
11
+ context.logger.info(`✅ Creating service: ${servicePascal} (${serviceKebab})`);
12
+ },
13
+ (0, schematics_1.mergeWith)((0, schematics_1.apply)((0, schematics_1.url)('./files'), [
14
+ (0, schematics_1.template)({ serviceKebab, servicePascal, store: options.store }),
15
+ (0, schematics_1.move)(`src/app/services/${serviceKebab}`) // gera os arquivos dentro de src/app/features/<service-kebab>
16
+ ]))
17
+ ]);
18
+ }
1
19
  //# sourceMappingURL=index.js.map
@@ -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,oBAAoB,YAAY,EAAE,CAAC,CAAC,8DAA8D;SACxG,CAAC,CACH;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,29 @@
1
+ import {
2
+ Rule,
3
+ SchematicContext,
4
+ Tree,
5
+ apply,
6
+ chain,
7
+ mergeWith,
8
+ template,
9
+ url,
10
+ move
11
+ } from '@angular-devkit/schematics';
12
+ import { toKebabCase, toPascalCase } from '../utils/string-utils';
13
+
14
+ export default function(options: any): Rule {
15
+ const serviceKebab = toKebabCase(options.name);
16
+ const servicePascal = toPascalCase(options.name);
17
+
18
+ return chain([
19
+ (_tree: Tree, context: SchematicContext) => {
20
+ context.logger.info(`✅ Creating service: ${servicePascal} (${serviceKebab})`);
21
+ },
22
+ mergeWith(
23
+ apply(url('./files'), [
24
+ template({ serviceKebab, servicePascal, store: options.store }),
25
+ move(`src/app/${serviceKebab}`) // gera os arquivos dentro de src/app/features/<service-kebab>
26
+ ])
27
+ )
28
+ ]);
29
+ }