@tech4good/angular-schematics 0.0.2 → 13.0.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.
- package/README.md +46 -46
- package/package.json +27 -27
- package/src/collection.json +25 -25
- package/src/component/index.d.ts +2 -2
- package/src/component/index.js +102 -102
- package/src/component/index.js.map +1 -1
- package/src/component/index_spec.d.ts +1 -1
- package/src/component/index_spec.js +22 -22
- package/src/component/schema.json +33 -29
- package/src/container/index.d.ts +2 -2
- package/src/container/index.js +282 -282
- package/src/container/index.js.map +1 -1
- package/src/container/index_spec.d.ts +1 -1
- package/src/container/index_spec.js +22 -22
- package/src/container/schema.json +28 -24
- package/src/entity/index.d.ts +2 -2
- package/src/entity/index.js +524 -524
- package/src/entity/index.js.map +1 -1
- package/src/entity/index_spec.d.ts +1 -1
- package/src/entity/index_spec.js +22 -22
- package/src/entity/schema.json +23 -19
- package/src/module/index.d.ts +2 -2
- package/src/module/index.js +87 -87
- package/src/module/index.js.map +1 -1
- package/src/module/index_spec.d.ts +1 -1
- package/src/module/index_spec.js +22 -22
- package/src/module/schema.json +23 -19
- package/src/shared/camelcase-formatter.d.ts +1 -1
- package/src/shared/camelcase-formatter.js +18 -18
- package/src/shared/statements-adder.d.ts +5 -5
- package/src/shared/statements-adder.js +31 -31
- package/tsconfig.json +34 -34
package/src/entity/index.js.map
CHANGED
|
@@ -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,MAAM,CAAC,QAAa;IAClC,OAAO,CAAC,IAAU,EAAE,QAA0B,EAAE,EAAE;QAChD,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","s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;QAC3C,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAC;YACpB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SACrB;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,aAAa,EAAE,WAAW,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,aAAa,EAAE,WAAW,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,WAAW,EAAE,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,kBAAkB,EAAE,QAAQ,CAAC,CAAC;QACxD,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,aAAa,EAAE,WAAW,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,aAAa,EAAE,WAAW,CAAC,CAAC;QACtD,OAAO,IAAI,CAAC;IACd,CAAC,CAAC;AACJ,CAAC;AA/hBD,wBA+hBC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/src/entity/index_spec.js
CHANGED
|
@@ -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('entity', () => {
|
|
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('entity', {}, 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('entity', () => {
|
|
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('entity', {}, schematics_1.Tree.empty()).toPromise();
|
|
20
|
+
expect(tree.files).toEqual([]);
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
23
23
|
//# sourceMappingURL=index_spec.js.map
|
package/src/entity/schema.json
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"id": "MyFullSchematicsSchema",
|
|
4
|
-
"title": "My Full Schematics Schema",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"index": {
|
|
8
|
-
"type": "number",
|
|
9
|
-
"default": 1
|
|
10
|
-
},
|
|
11
|
-
"name": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"x-prompt": "What should we name the entity?"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "MyFullSchematicsSchema",
|
|
4
|
+
"title": "My Full Schematics Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"index": {
|
|
8
|
+
"type": "number",
|
|
9
|
+
"default": 1
|
|
10
|
+
},
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"x-prompt": "What should we name the entity?"
|
|
14
|
+
},
|
|
15
|
+
"description": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"x-prompt": "Short description of the module (inserted as a comment):"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": [
|
|
21
|
+
"name"
|
|
22
|
+
]
|
|
23
|
+
}
|
package/src/module/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
-
export declare function module(_options: any): Rule;
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
export declare function module(_options: any): Rule;
|
package/src/module/index.js
CHANGED
|
@@ -1,88 +1,88 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.module = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const camelcase_formatter_1 = require("../shared/camelcase-formatter");
|
|
6
|
-
const statements_adder_1 = require("../shared/statements-adder");
|
|
7
|
-
const fs = require('fs');
|
|
8
|
-
// You don't have to export the function as default. You can also have more than one rule factory
|
|
9
|
-
// per file.
|
|
10
|
-
function module(_options) {
|
|
11
|
-
return (tree, _context) => {
|
|
12
|
-
const angularConfig = 'angular.json';
|
|
13
|
-
// Let's make sure we're in an angular workspace
|
|
14
|
-
if (!tree.exists(angularConfig))
|
|
15
|
-
throw new schematics_1.SchematicsException('???This is not an Angular worksapce! Try again in an Angular project.');
|
|
16
|
-
const { name } = _options;
|
|
17
|
-
const camelName = camelcase_formatter_1.CamelCaseFormatter(name, false);
|
|
18
|
-
const lowerCamelName = camelcase_formatter_1.CamelCaseFormatter(name, true);
|
|
19
|
-
const ModuleRoutingFile = `import { NgModule } from '@angular/core';
|
|
20
|
-
import { Routes, RouterModule } from '@angular/router';
|
|
21
|
-
|
|
22
|
-
// Containers
|
|
23
|
-
|
|
24
|
-
const routes: Routes = [
|
|
25
|
-
];
|
|
26
|
-
|
|
27
|
-
@NgModule({
|
|
28
|
-
imports: [RouterModule.forChild(routes)],
|
|
29
|
-
exports: [RouterModule],
|
|
30
|
-
})
|
|
31
|
-
export class ${camelName}RoutingModule { }
|
|
32
|
-
`;
|
|
33
|
-
const ModuleSpecFile = `import { ${camelName}Module } from './${name}.module';
|
|
34
|
-
|
|
35
|
-
describe('${camelName}Module', () => {
|
|
36
|
-
let ${lowerCamelName}Module: ${camelName}Module;
|
|
37
|
-
|
|
38
|
-
beforeEach(() => {
|
|
39
|
-
${lowerCamelName}Module = new ${camelName}Module();
|
|
40
|
-
});
|
|
41
|
-
|
|
42
|
-
it('should create an instance', () => {
|
|
43
|
-
expect(${lowerCamelName}Module).toBeTruthy();
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
`;
|
|
47
|
-
const ModuleFile = `import { NgModule } from '@angular/core';
|
|
48
|
-
import { CommonModule } from '@angular/common';
|
|
49
|
-
import { EffectsModule } from '@ngrx/effects';
|
|
50
|
-
import { SharedModule } from '../shared/shared.module';
|
|
51
|
-
import { ${camelName}RoutingModule } from './${name}-routing.module';
|
|
52
|
-
|
|
53
|
-
// Containers
|
|
54
|
-
|
|
55
|
-
// Components
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
@NgModule({
|
|
59
|
-
imports: [
|
|
60
|
-
CommonModule,
|
|
61
|
-
SharedModule,
|
|
62
|
-
${camelName}RoutingModule,
|
|
63
|
-
EffectsModule.forFeature([
|
|
64
|
-
]),
|
|
65
|
-
],
|
|
66
|
-
declarations: [
|
|
67
|
-
// Containers
|
|
68
|
-
// Components
|
|
69
|
-
],
|
|
70
|
-
})
|
|
71
|
-
export class ${camelName}Module { }`;
|
|
72
|
-
const filePath = 'src/app/app.module.ts';
|
|
73
|
-
const labels = ['// Feature Modules', '// Feature Modules'];
|
|
74
|
-
const statements = [`import { ${camelName}Module } from './${name}/${name}.module';`, ` ${camelName}Module,`];
|
|
75
|
-
statements_adder_1.AddStatements(filePath, labels, statements, tree);
|
|
76
|
-
// create directory before adding files
|
|
77
|
-
const dir = `./src/app/${name}`;
|
|
78
|
-
if (!fs.existsSync(dir)) {
|
|
79
|
-
fs.mkdirSync(dir);
|
|
80
|
-
}
|
|
81
|
-
tree.create(`${dir}/${name}-routing.module.ts`, ModuleRoutingFile);
|
|
82
|
-
tree.create(`${dir}/${name}.module.spec.ts`, ModuleSpecFile);
|
|
83
|
-
tree.create(`${dir}/${name}.module.ts`, ModuleFile);
|
|
84
|
-
return tree;
|
|
85
|
-
};
|
|
86
|
-
}
|
|
87
|
-
exports.module = module;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.module = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const camelcase_formatter_1 = require("../shared/camelcase-formatter");
|
|
6
|
+
const statements_adder_1 = require("../shared/statements-adder");
|
|
7
|
+
const fs = require('fs');
|
|
8
|
+
// You don't have to export the function as default. You can also have more than one rule factory
|
|
9
|
+
// per file.
|
|
10
|
+
function module(_options) {
|
|
11
|
+
return (tree, _context) => {
|
|
12
|
+
const angularConfig = 'angular.json';
|
|
13
|
+
// Let's make sure we're in an angular workspace
|
|
14
|
+
if (!tree.exists(angularConfig))
|
|
15
|
+
throw new schematics_1.SchematicsException('???This is not an Angular worksapce! Try again in an Angular project.');
|
|
16
|
+
const { name, description } = _options;
|
|
17
|
+
const camelName = (0, camelcase_formatter_1.CamelCaseFormatter)(name, false);
|
|
18
|
+
const lowerCamelName = (0, camelcase_formatter_1.CamelCaseFormatter)(name, true);
|
|
19
|
+
const ModuleRoutingFile = `import { NgModule } from '@angular/core';
|
|
20
|
+
import { Routes, RouterModule } from '@angular/router';
|
|
21
|
+
|
|
22
|
+
// Containers
|
|
23
|
+
|
|
24
|
+
const routes: Routes = [
|
|
25
|
+
];
|
|
26
|
+
|
|
27
|
+
@NgModule({
|
|
28
|
+
imports: [RouterModule.forChild(routes)],
|
|
29
|
+
exports: [RouterModule],
|
|
30
|
+
})
|
|
31
|
+
export class ${camelName}RoutingModule { }
|
|
32
|
+
`;
|
|
33
|
+
const ModuleSpecFile = `import { ${camelName}Module } from './${name}.module';
|
|
34
|
+
|
|
35
|
+
describe('${camelName}Module', () => {
|
|
36
|
+
let ${lowerCamelName}Module: ${camelName}Module;
|
|
37
|
+
|
|
38
|
+
beforeEach(() => {
|
|
39
|
+
${lowerCamelName}Module = new ${camelName}Module();
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
it('should create an instance', () => {
|
|
43
|
+
expect(${lowerCamelName}Module).toBeTruthy();
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
`;
|
|
47
|
+
const ModuleFile = `import { NgModule } from '@angular/core';
|
|
48
|
+
import { CommonModule } from '@angular/common';
|
|
49
|
+
import { EffectsModule } from '@ngrx/effects';
|
|
50
|
+
import { SharedModule } from '../shared/shared.module';
|
|
51
|
+
import { ${camelName}RoutingModule } from './${name}-routing.module';
|
|
52
|
+
|
|
53
|
+
// Containers
|
|
54
|
+
|
|
55
|
+
// Components
|
|
56
|
+
|
|
57
|
+
/** ${description} */
|
|
58
|
+
@NgModule({
|
|
59
|
+
imports: [
|
|
60
|
+
CommonModule,
|
|
61
|
+
SharedModule,
|
|
62
|
+
${camelName}RoutingModule,
|
|
63
|
+
EffectsModule.forFeature([
|
|
64
|
+
]),
|
|
65
|
+
],
|
|
66
|
+
declarations: [
|
|
67
|
+
// Containers
|
|
68
|
+
// Components
|
|
69
|
+
],
|
|
70
|
+
})
|
|
71
|
+
export class ${camelName}Module { }`;
|
|
72
|
+
const filePath = 'src/app/app.module.ts';
|
|
73
|
+
const labels = ['// Feature Modules', '// Feature Modules'];
|
|
74
|
+
const statements = [`import { ${camelName}Module } from './${name}/${name}.module';`, ` ${camelName}Module,`];
|
|
75
|
+
(0, statements_adder_1.AddStatements)(filePath, labels, statements, tree);
|
|
76
|
+
// create directory before adding files
|
|
77
|
+
const dir = `./src/app/${name}`;
|
|
78
|
+
if (!fs.existsSync(dir)) {
|
|
79
|
+
fs.mkdirSync(dir);
|
|
80
|
+
}
|
|
81
|
+
tree.create(`${dir}/${name}-routing.module.ts`, ModuleRoutingFile);
|
|
82
|
+
tree.create(`${dir}/${name}.module.spec.ts`, ModuleSpecFile);
|
|
83
|
+
tree.create(`${dir}/${name}.module.ts`, ModuleFile);
|
|
84
|
+
return tree;
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
exports.module = module;
|
|
88
88
|
//# sourceMappingURL=index.js.map
|
package/src/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","s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WAAW,SAAS;;;MAGtC,cAAc,gBAAgB,SAAS;;;;aAIhC,cAAc;;;CAG1B,CAAC;QAEE,MAAM,UAAU,GAAE;;;;WAIX,SAAS,2BAA2B,IAAI;;;;;;MAM7C,WAAW;;;;;UAKP,SAAS;;;;;;;;;eASJ,SAAS,YAAY,CAAC;QAEjC,MAAM,QAAQ,GAAG,uBAAuB,CAAC;QACzC,MAAM,MAAM,GAAG,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAC;QAC5D,MAAM,UAAU,GAAG,CAAC,YAAY,SAAS,oBAAoB,IAAI,IAAI,IAAI,WAAW,EAAE,OAAO,SAAS,SAAS,CAAC,CAAC;QACjH,IAAA,gCAAa,EAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,IAAI,CAAC,CAAC;QAElD,uCAAuC;QACvC,MAAM,GAAG,GAAG,aAAa,IAAI,EAAE,CAAC;QAChC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,GAAG,CAAC,EAAC;YACpB,EAAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;SACrB;QAED,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,oBAAoB,EAAE,iBAAiB,CAAC,CAAC;QACnE,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,iBAAiB,EAAE,cAAc,CAAC,CAAC;QAC7D,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,IAAI,IAAI,YAAY,EAAE,UAAU,CAAC,CAAC;QACpD,OAAO,IAAI,CAAC;IACZ,CAAC,CAAC;AACN,CAAC;AApFD,wBAoFC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {};
|
|
1
|
+
export {};
|
package/src/module/index_spec.js
CHANGED
|
@@ -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('module', () => {
|
|
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('module', {}, 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('module', () => {
|
|
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('module', {}, schematics_1.Tree.empty()).toPromise();
|
|
20
|
+
expect(tree.files).toEqual([]);
|
|
21
|
+
}));
|
|
22
|
+
});
|
|
23
23
|
//# sourceMappingURL=index_spec.js.map
|
package/src/module/schema.json
CHANGED
|
@@ -1,19 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"$schema": "http://json-schema.org/schema",
|
|
3
|
-
"id": "MyFullSchematicsSchema",
|
|
4
|
-
"title": "My Full Schematics Schema",
|
|
5
|
-
"type": "object",
|
|
6
|
-
"properties": {
|
|
7
|
-
"index": {
|
|
8
|
-
"type": "number",
|
|
9
|
-
"default": 1
|
|
10
|
-
},
|
|
11
|
-
"name": {
|
|
12
|
-
"type": "string",
|
|
13
|
-
"x-prompt": "What should we name the files?"
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "MyFullSchematicsSchema",
|
|
4
|
+
"title": "My Full Schematics Schema",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"index": {
|
|
8
|
+
"type": "number",
|
|
9
|
+
"default": 1
|
|
10
|
+
},
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"x-prompt": "What should we name the files?"
|
|
14
|
+
},
|
|
15
|
+
"description": {
|
|
16
|
+
"type": "string",
|
|
17
|
+
"x-prompt": "Short description of the module (inserted as a comment):"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
"required": [
|
|
21
|
+
"name"
|
|
22
|
+
]
|
|
23
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare function CamelCaseFormatter(name: string, lower: boolean): string;
|
|
1
|
+
export declare function CamelCaseFormatter(name: string, lower: boolean): string;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CamelCaseFormatter = void 0;
|
|
4
|
-
function CamelCaseFormatter(name, lower) {
|
|
5
|
-
// e.g. list-style-image to ListStyleImage
|
|
6
|
-
let camelName = name.charAt(0).toUpperCase() + name.substr(1);
|
|
7
|
-
if (name.indexOf('-') != -1) {
|
|
8
|
-
const names = name.split('-');
|
|
9
|
-
for (var i = 0; i < names.length; i++) {
|
|
10
|
-
names[i] = names[i].charAt(0).toUpperCase() + names[i].substr(1);
|
|
11
|
-
}
|
|
12
|
-
camelName = names.join("");
|
|
13
|
-
}
|
|
14
|
-
if (lower)
|
|
15
|
-
camelName = camelName.charAt(0).toLowerCase() + camelName.substr(1);
|
|
16
|
-
return camelName;
|
|
17
|
-
}
|
|
18
|
-
exports.CamelCaseFormatter = CamelCaseFormatter;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CamelCaseFormatter = void 0;
|
|
4
|
+
function CamelCaseFormatter(name, lower) {
|
|
5
|
+
// e.g. list-style-image to ListStyleImage
|
|
6
|
+
let camelName = name.charAt(0).toUpperCase() + name.substr(1);
|
|
7
|
+
if (name.indexOf('-') != -1) {
|
|
8
|
+
const names = name.split('-');
|
|
9
|
+
for (var i = 0; i < names.length; i++) {
|
|
10
|
+
names[i] = names[i].charAt(0).toUpperCase() + names[i].substr(1);
|
|
11
|
+
}
|
|
12
|
+
camelName = names.join("");
|
|
13
|
+
}
|
|
14
|
+
if (lower)
|
|
15
|
+
camelName = camelName.charAt(0).toLowerCase() + camelName.substr(1);
|
|
16
|
+
return camelName;
|
|
17
|
+
}
|
|
18
|
+
exports.CamelCaseFormatter = CamelCaseFormatter;
|
|
19
19
|
//# sourceMappingURL=camelcase-formatter.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
-
export interface IHash {
|
|
3
|
-
[details: string]: number;
|
|
4
|
-
}
|
|
5
|
-
export declare function AddStatements(filePath: string, labels: string[], statements: string[], tree: Tree): void;
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
export interface IHash {
|
|
3
|
+
[details: string]: number;
|
|
4
|
+
}
|
|
5
|
+
export declare function AddStatements(filePath: string, labels: string[], statements: string[], tree: Tree): void;
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AddStatements = void 0;
|
|
4
|
-
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
-
const change_1 = require("@schematics/angular/utility/change");
|
|
6
|
-
function AddStatements(filePath, labels, statements, tree) {
|
|
7
|
-
let text = tree.read(filePath); // reads the file from the tree
|
|
8
|
-
if (!text) {
|
|
9
|
-
throw new schematics_1.SchematicsException(`${filePath} does not exist.`); // throw an error if the file doesn't exist
|
|
10
|
-
}
|
|
11
|
-
let sourceText = text.toString('utf-8');
|
|
12
|
-
let index = 0;
|
|
13
|
-
const exportRecorder = tree.beginUpdate(filePath);
|
|
14
|
-
let labelMap = {};
|
|
15
|
-
for (let i = 0; i < labels.length; i++) {
|
|
16
|
-
// sourceText = sourceText.slice(index);
|
|
17
|
-
if (labelMap[labels[i]] === undefined)
|
|
18
|
-
labelMap[labels[i]] = 0;
|
|
19
|
-
labelMap[labels[i]]++;
|
|
20
|
-
let count = labelMap[labels[i]];
|
|
21
|
-
index = getPosition(sourceText, labels[i], count) + labels[i].length;
|
|
22
|
-
// declares import
|
|
23
|
-
const insertChange = new change_1.InsertChange(filePath, index, `\n${statements[i]}`);
|
|
24
|
-
exportRecorder.insertLeft(insertChange.pos, insertChange.toAdd);
|
|
25
|
-
}
|
|
26
|
-
tree.commitUpdate(exportRecorder);
|
|
27
|
-
}
|
|
28
|
-
exports.AddStatements = AddStatements;
|
|
29
|
-
function getPosition(string, subString, index) {
|
|
30
|
-
return string.split(subString, index).join(subString).length;
|
|
31
|
-
}
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AddStatements = void 0;
|
|
4
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
5
|
+
const change_1 = require("@schematics/angular/utility/change");
|
|
6
|
+
function AddStatements(filePath, labels, statements, tree) {
|
|
7
|
+
let text = tree.read(filePath); // reads the file from the tree
|
|
8
|
+
if (!text) {
|
|
9
|
+
throw new schematics_1.SchematicsException(`${filePath} does not exist.`); // throw an error if the file doesn't exist
|
|
10
|
+
}
|
|
11
|
+
let sourceText = text.toString('utf-8');
|
|
12
|
+
let index = 0;
|
|
13
|
+
const exportRecorder = tree.beginUpdate(filePath);
|
|
14
|
+
let labelMap = {};
|
|
15
|
+
for (let i = 0; i < labels.length; i++) {
|
|
16
|
+
// sourceText = sourceText.slice(index);
|
|
17
|
+
if (labelMap[labels[i]] === undefined)
|
|
18
|
+
labelMap[labels[i]] = 0;
|
|
19
|
+
labelMap[labels[i]]++;
|
|
20
|
+
let count = labelMap[labels[i]];
|
|
21
|
+
index = getPosition(sourceText, labels[i], count) + labels[i].length;
|
|
22
|
+
// declares import
|
|
23
|
+
const insertChange = new change_1.InsertChange(filePath, index, `\n${statements[i]}`);
|
|
24
|
+
exportRecorder.insertLeft(insertChange.pos, insertChange.toAdd);
|
|
25
|
+
}
|
|
26
|
+
tree.commitUpdate(exportRecorder);
|
|
27
|
+
}
|
|
28
|
+
exports.AddStatements = AddStatements;
|
|
29
|
+
function getPosition(string, subString, index) {
|
|
30
|
+
return string.split(subString, index).join(subString).length;
|
|
31
|
+
}
|
|
32
32
|
//# sourceMappingURL=statements-adder.js.map
|
package/tsconfig.json
CHANGED
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"baseUrl": "tsconfig",
|
|
4
|
-
"lib": [
|
|
5
|
-
"es2018",
|
|
6
|
-
"dom"
|
|
7
|
-
],
|
|
8
|
-
"declaration": true,
|
|
9
|
-
"module": "commonjs",
|
|
10
|
-
"moduleResolution": "node",
|
|
11
|
-
"noEmitOnError": true,
|
|
12
|
-
"noFallthroughCasesInSwitch": true,
|
|
13
|
-
"noImplicitAny": true,
|
|
14
|
-
"noImplicitThis": true,
|
|
15
|
-
"noUnusedParameters": true,
|
|
16
|
-
"noUnusedLocals": true,
|
|
17
|
-
"rootDir": "src/",
|
|
18
|
-
"skipDefaultLibCheck": true,
|
|
19
|
-
"skipLibCheck": true,
|
|
20
|
-
"sourceMap": true,
|
|
21
|
-
"strictNullChecks": true,
|
|
22
|
-
"target": "es6",
|
|
23
|
-
"types": [
|
|
24
|
-
"jasmine",
|
|
25
|
-
"node"
|
|
26
|
-
]
|
|
27
|
-
},
|
|
28
|
-
"include": [
|
|
29
|
-
"src/**/*"
|
|
30
|
-
],
|
|
31
|
-
"exclude": [
|
|
32
|
-
"src/*/files/**/*"
|
|
33
|
-
]
|
|
34
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": "tsconfig",
|
|
4
|
+
"lib": [
|
|
5
|
+
"es2018",
|
|
6
|
+
"dom"
|
|
7
|
+
],
|
|
8
|
+
"declaration": true,
|
|
9
|
+
"module": "commonjs",
|
|
10
|
+
"moduleResolution": "node",
|
|
11
|
+
"noEmitOnError": true,
|
|
12
|
+
"noFallthroughCasesInSwitch": true,
|
|
13
|
+
"noImplicitAny": true,
|
|
14
|
+
"noImplicitThis": true,
|
|
15
|
+
"noUnusedParameters": true,
|
|
16
|
+
"noUnusedLocals": true,
|
|
17
|
+
"rootDir": "src/",
|
|
18
|
+
"skipDefaultLibCheck": true,
|
|
19
|
+
"skipLibCheck": true,
|
|
20
|
+
"sourceMap": true,
|
|
21
|
+
"strictNullChecks": true,
|
|
22
|
+
"target": "es6",
|
|
23
|
+
"types": [
|
|
24
|
+
"jasmine",
|
|
25
|
+
"node"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"include": [
|
|
29
|
+
"src/**/*"
|
|
30
|
+
],
|
|
31
|
+
"exclude": [
|
|
32
|
+
"src/*/files/**/*"
|
|
33
|
+
]
|
|
34
|
+
}
|