@tech4good/angular-schematics 0.0.2 → 13.1.0

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.
Files changed (57) hide show
  1. package/README.md +46 -46
  2. package/package.json +27 -27
  3. package/src/collection.json +25 -25
  4. package/src/component/files/__name@dasherize__/__name@dasherize__.animations.ts.template +4 -0
  5. package/src/component/files/__name@dasherize__/__name@dasherize__.component.html.template +3 -0
  6. package/src/component/files/__name@dasherize__/__name@dasherize__.component.scss.template +7 -0
  7. package/src/component/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template +25 -0
  8. package/src/component/files/__name@dasherize__/__name@dasherize__.component.ts.template +30 -0
  9. package/src/component/index.d.ts +2 -2
  10. package/src/component/index.js +93 -102
  11. package/src/component/index.js.map +1 -1
  12. package/src/component/index_spec.d.ts +1 -1
  13. package/src/component/index_spec.js +22 -22
  14. package/src/component/schema.json +47 -29
  15. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.actions.ts.template +27 -0
  16. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.effects.ts.template +47 -0
  17. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.model.ts.template +0 -0
  18. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.selectors.ts.template +20 -0
  19. package/src/container/files/__name@dasherize__/+state/__name@dasherize__.state.ts.template +13 -0
  20. package/src/container/files/__name@dasherize__/__name@dasherize__.animations.ts.template +4 -0
  21. package/src/container/files/__name@dasherize__/__name@dasherize__.component.html.template +3 -0
  22. package/src/container/files/__name@dasherize__/__name@dasherize__.component.scss.template +5 -0
  23. package/src/container/files/__name@dasherize__/__name@dasherize__.component.spec.ts.template +25 -0
  24. package/src/container/files/__name@dasherize__/__name@dasherize__.component.ts.template +81 -0
  25. package/src/container/index.d.ts +2 -2
  26. package/src/container/index.js +115 -282
  27. package/src/container/index.js.map +1 -1
  28. package/src/container/index_spec.d.ts +1 -1
  29. package/src/container/index_spec.js +22 -22
  30. package/src/container/schema.json +47 -24
  31. package/src/entity/files/__name@dasherize__/__name@dasherize__.actions.ts.template +270 -0
  32. package/src/entity/files/__name@dasherize__/__name@dasherize__.effects.ts.template +131 -0
  33. package/src/entity/files/__name@dasherize__/__name@dasherize__.model.ts.template +7 -0
  34. package/src/entity/files/__name@dasherize__/__name@dasherize__.reducer.spec.ts.template +13 -0
  35. package/src/entity/files/__name@dasherize__/__name@dasherize__.reducer.ts.template +51 -0
  36. package/src/entity/files/__name@dasherize__/__name@dasherize__.service.ts.template +50 -0
  37. package/src/entity/index.d.ts +2 -2
  38. package/src/entity/index.js +123 -524
  39. package/src/entity/index.js.map +1 -1
  40. package/src/entity/index_spec.d.ts +1 -1
  41. package/src/entity/index_spec.js +22 -22
  42. package/src/entity/schema.json +42 -19
  43. package/src/module/files/__name@dasherize__/__name@dasherize__-routing.module.ts.template +13 -0
  44. package/src/module/files/__name@dasherize__/__name@dasherize__.module.spec.ts.template +13 -0
  45. package/src/module/files/__name@dasherize__/__name@dasherize__.module.ts.template +24 -0
  46. package/src/module/index.d.ts +2 -2
  47. package/src/module/index.js +96 -87
  48. package/src/module/index.js.map +1 -1
  49. package/src/module/index_spec.d.ts +1 -1
  50. package/src/module/index_spec.js +22 -22
  51. package/src/module/schema.json +38 -19
  52. package/src/shared/camelcase-formatter.d.ts +1 -1
  53. package/src/shared/camelcase-formatter.js +18 -18
  54. package/src/shared/statements-adder.d.ts +8 -5
  55. package/src/shared/statements-adder.js +52 -31
  56. package/src/shared/statements-adder.js.map +1 -1
  57. package/tsconfig.json +34 -34
package/README.md CHANGED
@@ -1,46 +1,46 @@
1
- # Getting Started With Schematics
2
-
3
- This repository is a basic Schematic implementation that serves as a starting point to create and publish Schematics to NPM.
4
-
5
- Used to generate modules, containers, components, and entities for Angular projects.
6
-
7
- ### Usage
8
-
9
- 1. Run `npm i angular-schematic`.
10
- 2. Run `ng generate angular-schematic:<schematic>` to generate files (`schematic` = module, container, component, or entity)
11
-
12
- ### Important Notes
13
-
14
- When generating **components** or **containers**: If the project has an import error for `waitForAsync` in `<component-name>.component.spec.ts`, update all instances to `async`.
15
- ### Developing
16
-
17
- 1. Clone this repository.
18
- 2. Run `npm install -g @angular-devkit/schematics-cli` to install globally
19
- 3. Run `npm install`, `npm run build` & `npm link`
20
- 4. Run `npm link angular-schematic` in the Angular project directory
21
- 5. Run `ng generate angular-schematic:<schematic>` to generate files (`schematic` = module, container, component, or entity)
22
-
23
- ### Testing
24
-
25
- To test locally, install `@angular-devkit/schematics-cli` globally and use the `schematics` command line tool. That tool acts the same as the `generate` command of the Angular CLI, but also has a debug mode.
26
-
27
- Check the documentation with
28
- ```bash
29
- schematics --help
30
- ```
31
-
32
- ### Unit Testing
33
-
34
- `npm run test` will run the unit tests, using Jasmine as a runner and test framework.
35
-
36
- ### Publishing
37
-
38
- To publish, simply do:
39
-
40
- ```bash
41
- npm run build
42
- npm publish
43
- ```
44
-
45
- That's it!
46
-
1
+ # Angular Schematics
2
+
3
+ This repository is used to generate modules, containers, components, and entities for Angular projects.
4
+
5
+ ### Usage
6
+
7
+ 1. Run `npm install @tech4good/angular-schematics`.
8
+ 2. Set the schematics to be the default using: `ng config cli.defaultCollection @tech4good/angular-schematics`
9
+ 3. Change directories to the directory you want to generate the files and run `ng generate <schematic> <name>`, where `schematic` = module, container, component, or entity (or if you did not make it the default, use `ng generate @tech4good/angular-schematics:<schematic> <name>`)
10
+
11
+ ### Developing
12
+
13
+ 1. Clone this repository.
14
+ 2. Run `npm install -g @angular-devkit/schematics-cli` to install globally
15
+ 3. Run `npm install`, `npm run build` & `npm link`
16
+ 4. Run `npm link @tech4good/angular-schematics` in the Angular project directory
17
+ 5. Run `ng generate @tech4good/angular-schematics:<schematic>` to generate files (`schematic` = module, container, component, or entity)
18
+ 6. To test/debug new changes, run `npm run build` again before `ng generate ...`
19
+
20
+ ### Testing
21
+
22
+ To test, install the repo directly from github into another local repo to test your schematic.
23
+
24
+ ```
25
+ npm install https://github.com/tech4good-lab/angular-schematics.git#your-branch-name
26
+ npm link @tech4good/angular-schematics
27
+ ng generate @tech4good/angular-schematics:<schematic>
28
+ ```
29
+
30
+ ### Unit Testing
31
+
32
+ `npm run test` will run the unit tests, using Jasmine as a runner and test framework.
33
+
34
+ ### Publishing
35
+
36
+ To publish, simply do:
37
+
38
+ ```bash
39
+ npm run build
40
+ npm publish
41
+ ```
42
+
43
+ That's it!
44
+
45
+ You can also use `npm version <version>` to update the version before publishing.
46
+
package/package.json CHANGED
@@ -1,27 +1,27 @@
1
- {
2
- "name": "@tech4good/angular-schematics",
3
- "version": "0.0.2",
4
- "description": "A blank schematics",
5
- "scripts": {
6
- "build": "tsc -p tsconfig.json",
7
- "test": "npm run build && jasmine src/**/*_spec.js"
8
- },
9
- "keywords": [
10
- "schematics"
11
- ],
12
- "author": "",
13
- "license": "MIT",
14
- "schematics": "./src/collection.json",
15
- "dependencies": {
16
- "@angular-devkit/core": "^11.2.6",
17
- "@angular-devkit/schematics": "^11.2.6",
18
- "@angular-devkit/schematics-cli": "^0.1102.6",
19
- "@schematics/angular": "^11.2.7",
20
- "typescript": "~4.1.2"
21
- },
22
- "devDependencies": {
23
- "@types/node": "^12.11.1",
24
- "@types/jasmine": "~3.5.0",
25
- "jasmine": "^3.5.0"
26
- }
27
- }
1
+ {
2
+ "name": "@tech4good/angular-schematics",
3
+ "version": "13.1.0",
4
+ "description": "A set of schematics for generating modules, containers, components, and entities",
5
+ "scripts": {
6
+ "build": "tsc -p tsconfig.json",
7
+ "test": "npm run build && jasmine src/**/*_spec.js"
8
+ },
9
+ "keywords": [
10
+ "schematics"
11
+ ],
12
+ "author": "",
13
+ "license": "MIT",
14
+ "schematics": "./src/collection.json",
15
+ "dependencies": {
16
+ "@angular-devkit/core": "^13.2.5",
17
+ "@angular-devkit/schematics": "^13.2.5",
18
+ "@angular-devkit/schematics-cli": "^13.2.5",
19
+ "@schematics/angular": "^13.2.5",
20
+ "typescript": "~4.5.5"
21
+ },
22
+ "devDependencies": {
23
+ "@types/node": "^12.11.1",
24
+ "@types/jasmine": "~3.6.0",
25
+ "jasmine": "^3.5.0"
26
+ }
27
+ }
@@ -1,25 +1,25 @@
1
- {
2
- "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
- "schematics": {
4
- "module": {
5
- "description": "A blank schematic.",
6
- "factory": "./module/index#module",
7
- "schema": "./module/schema.json"
8
- },
9
- "container": {
10
- "description": "A blank schematic.",
11
- "factory": "./container/index#container",
12
- "schema": "./container/schema.json"
13
- },
14
- "component": {
15
- "description": "A blank schematic.",
16
- "factory": "./component/index#component",
17
- "schema": "./component/schema.json"
18
- },
19
- "entity": {
20
- "description": "A blank schematic.",
21
- "factory": "./entity/index#entity",
22
- "schema": "./entity/schema.json"
23
- }
24
- }
25
- }
1
+ {
2
+ "$schema": "../node_modules/@angular-devkit/schematics/collection-schema.json",
3
+ "schematics": {
4
+ "module": {
5
+ "description": "Generate a new module.",
6
+ "factory": "./module/index#module",
7
+ "schema": "./module/schema.json"
8
+ },
9
+ "container": {
10
+ "description": "Generate a new container.",
11
+ "factory": "./container/index#container",
12
+ "schema": "./container/schema.json"
13
+ },
14
+ "component": {
15
+ "description": "Generate a new component.",
16
+ "factory": "./component/index#component",
17
+ "schema": "./component/schema.json"
18
+ },
19
+ "entity": {
20
+ "description": "Generate a new entity.",
21
+ "factory": "./entity/index#entity",
22
+ "schema": "./entity/schema.json"
23
+ }
24
+ }
25
+ }
@@ -0,0 +1,4 @@
1
+ import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
2
+
3
+ export const <%= classify(name) %>Animations = [
4
+ ];
@@ -0,0 +1,3 @@
1
+ <div class="<%= dasherize(name) %>-container">
2
+ <%= dasherize(name) %> works!
3
+ </div>
@@ -0,0 +1,7 @@
1
+ :host {
2
+ display: block;
3
+ .<%= dasherize(name) %>-container {
4
+ // REMOVE WHEN FINISHING LAYOUT STYLES
5
+ border: 1px solid black;
6
+ }
7
+ }
@@ -0,0 +1,25 @@
1
+ import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
2
+
3
+ import { <%= classify(name) %>Component } from './<%= dasherize(name) %>.component';
4
+
5
+ describe('<%= classify(name) %>Component', () => {
6
+ let component: <%= classify(name) %>Component;
7
+ let fixture: ComponentFixture<<%= classify(name) %>Component>;
8
+
9
+ beforeEach(waitForAsync(() => {
10
+ TestBed.configureTestingModule({
11
+ declarations: [<%= classify(name) %>Component],
12
+ })
13
+ .compileComponents();
14
+ }));
15
+
16
+ beforeEach(() => {
17
+ fixture = TestBed.createComponent(<%= classify(name) %>Component);
18
+ component = fixture.componentInstance;
19
+ fixture.detectChanges();
20
+ });
21
+
22
+ it('should create', () => {
23
+ expect(component).toBeTruthy();
24
+ });
25
+ });
@@ -0,0 +1,30 @@
1
+ import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
2
+ import { <%= classify(name) %>Animations } from './<%= dasherize(name) %>.animations';
3
+
4
+ @Component({
5
+ selector: 'app-<%= dasherize(name) %>',
6
+ templateUrl: './<%= dasherize(name) %>.component.html',
7
+ styleUrls: ['./<%= dasherize(name) %>.component.scss'],
8
+ changeDetection: ChangeDetectionStrategy.OnPush,
9
+ animations: <%= classify(name) %>Animations,
10
+ })
11
+ export class <%= classify(name) %>Component implements OnInit {
12
+ // --------------- INPUTS AND OUTPUTS ---------
13
+
14
+
15
+ // --------------- LOCAL UI STATE ----------------------
16
+
17
+
18
+ constructor() { }
19
+
20
+ ngOnInit(): void {
21
+ }
22
+
23
+ // --------------- DATA BINDING FUNCTIONS ----------------
24
+
25
+
26
+ // --------------- EVENT BINDING FUNCTIONS ---------------
27
+
28
+
29
+ // --------------- OTHER -------------------------------
30
+ }
@@ -1,2 +1,2 @@
1
- import { Rule } from '@angular-devkit/schematics';
2
- export declare function component(_options: any): Rule;
1
+ import { Rule } from '@angular-devkit/schematics';
2
+ export declare function component(options: any): Rule;
@@ -1,103 +1,94 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.component = void 0;
4
- const camelcase_formatter_1 = require("../shared/camelcase-formatter");
5
- const statements_adder_1 = require("../shared/statements-adder");
6
- const fs = require('fs');
7
- // You don't have to export the function as default. You can also have more than one rule factory
8
- // per file.
9
- function component(_options) {
10
- return (tree, _context) => {
11
- const { name, module, container } = _options;
12
- const camelName = camelcase_formatter_1.CamelCaseFormatter(name, false);
13
- const AnimationsFile = `import { trigger, group, query, animateChild, state, style, animate, transition } from '@angular/animations';
14
-
15
- export const ${camelName}Animations = [
16
- ];
17
- `;
18
- const CSSFile = `.${name}-container {
19
- // REMOVE WHEN FINISHING LAYOUT STYLES
20
- border: 1px solid black;
21
- }`;
22
- const HTMLFile = `<div class="${name}-container">
23
- ${name} works!
24
- </div>`;
25
- const ComponentFile = `import { Component, OnInit, ChangeDetectionStrategy, Input, Output, EventEmitter } from '@angular/core';
26
- import { ${camelName}Animations } from './${name}.animations';
27
-
28
- /** test */
29
- @Component({
30
- selector: 'app-${name}',
31
- templateUrl: './${name}.component.html',
32
- styleUrls: ['./${name}.component.scss'],
33
- changeDetection: ChangeDetectionStrategy.OnPush,
34
- animations: ${camelName}Animations,
35
- })
36
- export class ${camelName}Component implements OnInit {
37
-
38
- // --------------- INPUTS AND OUTPUTS ---------
39
-
40
-
41
- // --------------- LOCAL UI STATE ----------------------
42
-
43
-
44
- constructor() { }
45
-
46
- ngOnInit() {
47
- }
48
-
49
- // --------------- DATA BINDING FUNCTIONS ----------------
50
-
51
-
52
- // --------------- EVENT BINDING FUNCTIONS ---------------
53
-
54
-
55
- // --------------- OTHER -------------------------------
56
-
57
- }
58
- `;
59
- const SpecFile = `import { waitForAsync, ComponentFixture, TestBed } from '@angular/core/testing';
60
-
61
- import { ${camelName}Component } from './${name}.component';
62
-
63
- describe('${camelName}Component', () => {
64
- let component: ${camelName}Component;
65
- let fixture: ComponentFixture<${camelName}Component>;
66
-
67
- beforeEach(waitForAsync(() => {
68
- TestBed.configureTestingModule({
69
- declarations: [ ${camelName}Component ],
70
- })
71
- .compileComponents();
72
- }));
73
-
74
- beforeEach(() => {
75
- fixture = TestBed.createComponent(${camelName}Component);
76
- component = fixture.componentInstance;
77
- fixture.detectChanges();
78
- });
79
-
80
- it('should create', () => {
81
- expect(component).toBeTruthy();
82
- });
83
- });
84
- `;
85
- const filePath = `./src/app/${module}/${module}.module.ts`;
86
- const labels = ['// Components', '// Components'];
87
- const statements = [`import { ${camelName}Component } from './${container}/${name}/${name}.component';`, ` ${camelName}Component,`];
88
- statements_adder_1.AddStatements(filePath, labels, statements, tree);
89
- // create directories before adding files
90
- const dir = `./src/app/${module}/${container}/${name}`;
91
- if (!fs.existsSync(dir)) {
92
- fs.mkdirSync(dir);
93
- }
94
- tree.create(`${dir}/${name}.animations.ts`, AnimationsFile);
95
- tree.create(`${dir}/${name}.component.html`, HTMLFile);
96
- tree.create(`${dir}/${name}.component.scss`, CSSFile);
97
- tree.create(`${dir}/${name}.component.spec.ts`, SpecFile);
98
- tree.create(`${dir}/${name}.component.ts`, ComponentFile);
99
- return tree;
100
- };
101
- }
102
- exports.component = component;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.component = void 0;
13
+ const schematics_1 = require("@angular-devkit/schematics");
14
+ const change_1 = require("@schematics/angular/utility/change");
15
+ const find_module_1 = require("@schematics/angular/utility/find-module");
16
+ const parse_name_1 = require("@schematics/angular/utility/parse-name");
17
+ const validation_1 = require("@schematics/angular/utility/validation");
18
+ const workspace_1 = require("@schematics/angular/utility/workspace");
19
+ const core_1 = require("@angular-devkit/core");
20
+ const statements_adder_1 = require("../shared/statements-adder");
21
+ function addInserts(options) {
22
+ return (host, context) => {
23
+ if (!options.module) {
24
+ return host;
25
+ }
26
+ const modulePath = options.module;
27
+ const sourceText = (0, statements_adder_1.getSourceText)(host, modulePath);
28
+ context.logger.info(`modulePath: ${modulePath}`);
29
+ // Get parameters for adding declaration to module (including import)
30
+ context.logger.info(`options.path: ${options.path}`);
31
+ const componentPath = `/${options.path}/` +
32
+ core_1.strings.dasherize(options.name) + '/' +
33
+ core_1.strings.dasherize(options.name) + '.component';
34
+ context.logger.info(`componentPath: ${componentPath}`);
35
+ const relativePath = (0, find_module_1.buildRelativePath)(modulePath, componentPath);
36
+ context.logger.info(`relativePath: ${relativePath}`);
37
+ const classifiedName = core_1.strings.classify(options.name) + 'Component';
38
+ context.logger.info(`classifiedName: ${classifiedName}`);
39
+ const isSharedModule = options.module.startsWith('/src/app/shared');
40
+ let insertChanges = (0, statements_adder_1.simpleInsert)(sourceText, modulePath, [
41
+ '// Components',
42
+ '// Components',
43
+ // If the module is shared, then add an export too
44
+ ...isSharedModule ? ['// Components'] : [],
45
+ ], [
46
+ `import { ${classifiedName} } from '${relativePath}';`,
47
+ ` ${classifiedName},`,
48
+ ...isSharedModule ? [` ${classifiedName},`] : [],
49
+ ]);
50
+ const declarationRecorder = host.beginUpdate(modulePath);
51
+ for (const change of insertChanges) {
52
+ if (change instanceof change_1.InsertChange) {
53
+ declarationRecorder.insertLeft(change.pos, change.toAdd);
54
+ }
55
+ }
56
+ host.commitUpdate(declarationRecorder);
57
+ return host;
58
+ };
59
+ }
60
+ function component(options) {
61
+ return (tree, context) => __awaiter(this, void 0, void 0, function* () {
62
+ // Make sure the command is executed in the directory where the component should be generated
63
+ if (!options.inDirectory) {
64
+ context.logger.info("Please navigate to the directory where you want to generate the component.");
65
+ return (0, schematics_1.noop)();
66
+ }
67
+ const workspace = yield (0, workspace_1.getWorkspace)(tree);
68
+ const project = workspace.projects.get(options.project);
69
+ if (!project) {
70
+ throw new schematics_1.SchematicsException(`Project "${options.project}" does not exist.`);
71
+ }
72
+ context.logger.info(`options.path: ${options.path}`);
73
+ if (options.path === undefined) {
74
+ options.path = (0, workspace_1.buildDefaultPath)(project);
75
+ }
76
+ context.logger.info(`options.path: ${options.path}`);
77
+ options.module = (0, find_module_1.findModuleFromOptions)(tree, options);
78
+ context.logger.info(`options.module: ${options.module}`);
79
+ const parsedPath = (0, parse_name_1.parseName)(options.path, options.name);
80
+ options.name = parsedPath.name;
81
+ options.path = parsedPath.path;
82
+ (0, validation_1.validateHtmlSelector)(options.selector);
83
+ const templateSource = (0, schematics_1.apply)((0, schematics_1.url)('./files'), [
84
+ (0, schematics_1.applyTemplates)(Object.assign(Object.assign({}, core_1.strings), options)),
85
+ (0, schematics_1.move)(parsedPath.path),
86
+ ]);
87
+ return (0, schematics_1.chain)([
88
+ addInserts(options),
89
+ (0, schematics_1.mergeWith)(templateSource)
90
+ ]);
91
+ });
92
+ }
93
+ exports.component = component;
103
94
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;AAEA,uEAAmE;AACnE,iEAA2D;AAE3D,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AAEzB,iGAAiG;AACjG,YAAY;AACZ,SAAgB,SAAS,CAAC,QAAa;IACrC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,QAAQ,CAAC;QAC7C,MAAM,SAAS,GAAG,wCAAkB,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;QAElD,MAAM,cAAc,GAAG;;eAEZ,SAAS;;CAEvB,CAAC;QAEE,MAAM,OAAO,GAAG,IAAI,IAAI;;;EAG1B,CAAC;QAE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AAC,cAAc,CAAC;SAC1B,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC;AA5CD,8BA4CC"}
@@ -1 +1 @@
1
- export {};
1
+ export {};
@@ -1,23 +1,23 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const schematics_1 = require("@angular-devkit/schematics");
13
- const testing_1 = require("@angular-devkit/schematics/testing");
14
- const path = require("path");
15
- const collectionPath = path.join(__dirname, '../collection.json');
16
- describe('component', () => {
17
- it('works', () => __awaiter(void 0, void 0, void 0, function* () {
18
- const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
19
- const tree = yield runner.runSchematicAsync('component', {}, schematics_1.Tree.empty()).toPromise();
20
- expect(tree.files).toEqual([]);
21
- }));
22
- });
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const schematics_1 = require("@angular-devkit/schematics");
13
+ const testing_1 = require("@angular-devkit/schematics/testing");
14
+ const path = require("path");
15
+ const collectionPath = path.join(__dirname, '../collection.json');
16
+ describe('component', () => {
17
+ it('works', () => __awaiter(void 0, void 0, void 0, function* () {
18
+ const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
19
+ const tree = yield runner.runSchematicAsync('component', {}, schematics_1.Tree.empty()).toPromise();
20
+ expect(tree.files).toEqual([]);
21
+ }));
22
+ });
23
23
  //# sourceMappingURL=index_spec.js.map