@rxap/plugin-angular 16.1.0-dev.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/CHANGELOG.md +17 -0
- package/GETSTARTED.md +0 -0
- package/GUIDES.md +0 -0
- package/README.md +62 -0
- package/generators.json +29 -0
- package/package.json +73 -0
- package/src/generators/fix-schematic/generator.d.ts +4 -0
- package/src/generators/fix-schematic/generator.js +66 -0
- package/src/generators/fix-schematic/generator.js.map +1 -0
- package/src/generators/fix-schematic/schema.d.ts +3 -0
- package/src/generators/fix-schematic/schema.json +21 -0
- package/src/generators/init/generator.d.ts +4 -0
- package/src/generators/init/generator.js +38 -0
- package/src/generators/init/generator.js.map +1 -0
- package/src/generators/init/schema.d.ts +3 -0
- package/src/generators/init/schema.json +16 -0
- package/src/generators/init-application/files/shared/.gitkeep +0 -0
- package/src/generators/init-application/files/shared/assets/.dockerignore +1 -0
- package/src/generators/init-application/files/shared/assets/Dockerfile +5 -0
- package/src/generators/init-application/files/shared/assets/nginx.conf +74 -0
- package/src/generators/init-application/files/shared/i18n.index.html.hbs +40 -0
- package/src/generators/init-application/files/shared/ngsw-config.json +62 -0
- package/src/generators/init-application/files/shared/proxy.conf.json +6 -0
- package/src/generators/init-application/generator.d.ts +4 -0
- package/src/generators/init-application/generator.js +263 -0
- package/src/generators/init-application/generator.js.map +1 -0
- package/src/generators/init-application/schema.d.ts +12 -0
- package/src/generators/init-application/schema.json +46 -0
- package/src/generators/init-library/generator.d.ts +4 -0
- package/src/generators/init-library/generator.js +109 -0
- package/src/generators/init-library/generator.js.map +1 -0
- package/src/generators/init-library/schema.d.ts +3 -0
- package/src/generators/init-library/schema.json +16 -0
- package/src/generators/schematic/files/schematic/__fileName__/index.ts.template +8 -0
- package/src/generators/schematic/files/schematic/__fileName__/schema.d.ts.template +3 -0
- package/src/generators/schematic/files/schematic/__fileName__/schema.json.template +18 -0
- package/src/generators/schematic/generator.d.ts +6 -0
- package/src/generators/schematic/generator.js +137 -0
- package/src/generators/schematic/generator.js.map +1 -0
- package/src/generators/schematic/schema.d.ts +6 -0
- package/src/generators/schematic/schema.json +43 -0
- package/src/index.d.ts +3 -0
- package/src/index.js +10 -0
- package/src/index.js.map +1 -0
- package/src/lib/skip-project.d.ts +1 -0
- package/src/lib/skip-project.js +19 -0
- package/src/lib/skip-project.js.map +1 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.schematicGenerator = exports.hasSchematic = exports.createCollectionJson = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const devkit_1 = require("@nx/devkit");
|
|
6
|
+
const path = require("path");
|
|
7
|
+
function normalizeOptions(host, options) {
|
|
8
|
+
const { npmScope } = (0, devkit_1.getWorkspaceLayout)(host);
|
|
9
|
+
const { root: projectRoot, sourceRoot: projectSourceRoot, } = (0, devkit_1.readProjectConfiguration)(host, options.project);
|
|
10
|
+
const npmPackageName = (0, devkit_1.readJson)(host, path.join(projectRoot, 'package.json')).name;
|
|
11
|
+
let description;
|
|
12
|
+
if (options.description) {
|
|
13
|
+
description = options.description;
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
description = `${options.name} schematic`;
|
|
17
|
+
}
|
|
18
|
+
return Object.assign(Object.assign(Object.assign({}, options), (0, devkit_1.names)(options.name)), { description,
|
|
19
|
+
projectRoot,
|
|
20
|
+
projectSourceRoot,
|
|
21
|
+
npmScope,
|
|
22
|
+
npmPackageName });
|
|
23
|
+
}
|
|
24
|
+
function addFiles(host, options) {
|
|
25
|
+
(0, devkit_1.generateFiles)(host, path.join(__dirname, './files/schematic'), `${options.projectSourceRoot}/schematics`, Object.assign(Object.assign({}, options), { schematicFnName: `${options.propertyName}Schematic`, schemaInterfaceName: `${options.className}SchematicSchema` }));
|
|
26
|
+
}
|
|
27
|
+
function createCollectionJson(host, projectRoot) {
|
|
28
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
29
|
+
(0, devkit_1.updateJson)(host, (0, devkit_1.joinPathFragments)(projectRoot, 'package.json'), (json) => {
|
|
30
|
+
var _a;
|
|
31
|
+
(_a = json.schematics) !== null && _a !== void 0 ? _a : (json.schematics = './collection.json');
|
|
32
|
+
return json;
|
|
33
|
+
});
|
|
34
|
+
(0, devkit_1.writeJson)(host, (0, devkit_1.joinPathFragments)(projectRoot, 'collection.json'), {
|
|
35
|
+
schematics: {},
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
exports.createCollectionJson = createCollectionJson;
|
|
40
|
+
function updateCollectionJson(host, options) {
|
|
41
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
42
|
+
const packageJson = (0, devkit_1.readJson)(host, (0, devkit_1.joinPathFragments)(options.projectRoot, 'package.json'));
|
|
43
|
+
const packageJsonSchematics = packageJson.schematics;
|
|
44
|
+
let schematicsPath = packageJsonSchematics ? (0, devkit_1.joinPathFragments)(options.projectRoot, packageJsonSchematics) : null;
|
|
45
|
+
if (!schematicsPath) {
|
|
46
|
+
schematicsPath = (0, devkit_1.joinPathFragments)(options.projectRoot, 'collection.json');
|
|
47
|
+
}
|
|
48
|
+
if (!host.exists(schematicsPath)) {
|
|
49
|
+
yield createCollectionJson(host, options.projectRoot);
|
|
50
|
+
}
|
|
51
|
+
(0, devkit_1.updateJson)(host, schematicsPath, (json) => {
|
|
52
|
+
let schematics = json.schematics;
|
|
53
|
+
schematics !== null && schematics !== void 0 ? schematics : (schematics = {});
|
|
54
|
+
schematics[options.name] = {
|
|
55
|
+
factory: `./src/schematics/${options.fileName}/index`,
|
|
56
|
+
schema: `./src/schematics/${options.fileName}/schema.json`,
|
|
57
|
+
description: options.description,
|
|
58
|
+
};
|
|
59
|
+
json.schematics = schematics;
|
|
60
|
+
return json;
|
|
61
|
+
});
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
function hasSchematic(tree, projectName, schematicName) {
|
|
65
|
+
var _a;
|
|
66
|
+
const project = (0, devkit_1.readProjectConfiguration)(tree, projectName);
|
|
67
|
+
const packageJson = (0, devkit_1.readJson)(tree, (0, devkit_1.joinPathFragments)(project.root, 'package.json'));
|
|
68
|
+
if (!packageJson.schematics) {
|
|
69
|
+
return false;
|
|
70
|
+
}
|
|
71
|
+
const schematicsPath = (0, devkit_1.joinPathFragments)(project.root, packageJson.schematics);
|
|
72
|
+
const collectionJson = (0, devkit_1.readJson)(tree, schematicsPath);
|
|
73
|
+
return (((_a = collectionJson.schematics) === null || _a === void 0 ? void 0 : _a[schematicName]) !== undefined);
|
|
74
|
+
}
|
|
75
|
+
exports.hasSchematic = hasSchematic;
|
|
76
|
+
function coerceBuildTarget(tree, { projectRoot, project, }) {
|
|
77
|
+
var _a, _b, _c, _d, _e;
|
|
78
|
+
var _f, _g;
|
|
79
|
+
const projectConfiguration = (0, devkit_1.readProjectConfiguration)(tree, project);
|
|
80
|
+
(_a = projectConfiguration.targets) !== null && _a !== void 0 ? _a : (projectConfiguration.targets = {});
|
|
81
|
+
(_b = (_f = projectConfiguration.targets)['build']) !== null && _b !== void 0 ? _b : (_f['build'] = {});
|
|
82
|
+
const buildTarget = projectConfiguration.targets['build'];
|
|
83
|
+
buildTarget.executor = '@nx/js:tsc';
|
|
84
|
+
(_c = buildTarget.outputs) !== null && _c !== void 0 ? _c : (buildTarget.outputs = ['{options.outputPath}']);
|
|
85
|
+
(_d = buildTarget.options) !== null && _d !== void 0 ? _d : (buildTarget.options = {});
|
|
86
|
+
buildTarget.options.outputPath = `dist/${projectRoot}`;
|
|
87
|
+
buildTarget.options.main = `${projectRoot}/src/index.ts`;
|
|
88
|
+
buildTarget.options.tsConfig = `${projectRoot}/tsconfig.lib.json`;
|
|
89
|
+
(_e = (_g = buildTarget.options).assets) !== null && _e !== void 0 ? _e : (_g.assets = []);
|
|
90
|
+
const assets = [
|
|
91
|
+
`${projectRoot}/*.md`, {
|
|
92
|
+
'input': `./${projectRoot}/src`,
|
|
93
|
+
'glob': '**/!(*.ts)',
|
|
94
|
+
'output': './src',
|
|
95
|
+
}, {
|
|
96
|
+
'input': `./${projectRoot}/src`,
|
|
97
|
+
'glob': '**/*.d.ts',
|
|
98
|
+
'output': './src',
|
|
99
|
+
}, {
|
|
100
|
+
'input': `./${projectRoot}`,
|
|
101
|
+
'glob': 'collection.json',
|
|
102
|
+
'output': '.',
|
|
103
|
+
},
|
|
104
|
+
];
|
|
105
|
+
for (const asset of assets) {
|
|
106
|
+
if (!buildTarget.options.assets.some(a => {
|
|
107
|
+
if (typeof asset === typeof a) {
|
|
108
|
+
if (typeof asset === 'string') {
|
|
109
|
+
return asset === a;
|
|
110
|
+
}
|
|
111
|
+
else {
|
|
112
|
+
return asset.input === a.input && asset.glob === a.glob && asset.output === a.output;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
})) {
|
|
116
|
+
buildTarget.options.assets.push(asset);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
(0, devkit_1.updateProjectConfiguration)(tree, project, projectConfiguration);
|
|
120
|
+
}
|
|
121
|
+
function schematicGenerator(host, _options) {
|
|
122
|
+
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
123
|
+
const options = normalizeOptions(host, _options);
|
|
124
|
+
if (hasSchematic(host, options.project, options.name)) {
|
|
125
|
+
throw new Error(`Generator ${options.name} already exists.`);
|
|
126
|
+
}
|
|
127
|
+
addFiles(host, options);
|
|
128
|
+
yield updateCollectionJson(host, options);
|
|
129
|
+
if (!options.skipFormat) {
|
|
130
|
+
yield (0, devkit_1.formatFiles)(host);
|
|
131
|
+
}
|
|
132
|
+
coerceBuildTarget(host, options);
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
exports.schematicGenerator = schematicGenerator;
|
|
136
|
+
exports.default = schematicGenerator;
|
|
137
|
+
//# sourceMappingURL=generator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generator.js","sourceRoot":"","sources":["../../../../../../../packages/plugin/angular/src/generators/schematic/generator.ts"],"names":[],"mappings":";;;;AAAA,uCAaoB;AAEpB,6BAA6B;AAY7B,SAAS,gBAAgB,CAAC,IAAU,EAAE,OAAiC;IACrE,MAAM,EAAE,QAAQ,EAAE,GAAG,IAAA,2BAAkB,EAAC,IAAI,CAAC,CAAC;IAE9C,MAAM,EACJ,IAAI,EAAE,WAAW,EACjB,UAAU,EAAE,iBAAiB,GAC9B,GAAG,IAAA,iCAAwB,EAAC,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;IAEpD,MAAM,cAAc,GAAG,IAAA,iBAAQ,EAAmB,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC;IAErG,IAAI,WAAmB,CAAC;IACxB,IAAI,OAAO,CAAC,WAAW,EAAE;QACvB,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;KACnC;SAAM;QACL,WAAW,GAAG,GAAI,OAAO,CAAC,IAAK,YAAY,CAAC;KAC7C;IAED,qDACK,OAAO,GAAK,IAAA,cAAK,EAAC,OAAO,CAAC,IAAI,CAAC,KAClC,WAAW;QACX,WAAW;QACX,iBAAiB;QACjB,QAAQ;QACR,cAAc,IACd;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,IAAU,EAAE,OAAyB;IACrD,IAAA,sBAAa,EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,mBAAmB,CAAC,EAAE,GAAI,OAAO,CAAC,iBAAkB,aAAa,kCACrG,OAAO,KACV,eAAe,EAAE,GAAI,OAAO,CAAC,YAAa,WAAW,EACrD,mBAAmB,EAAE,GAAI,OAAO,CAAC,SAAU,iBAAiB,IAC5D,CAAC;AACL,CAAC;AAED,SAAsB,oBAAoB,CAAC,IAAU,EAAE,WAAmB;;QACxE,IAAA,mBAAU,EAAc,IAAI,EAAE,IAAA,0BAAiB,EAAC,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AM,CAAC;iBACtF;aACF;QACH,CAAC,CAAC,EAAE;YACF,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;SACxC;KACF;IAED,IAAA,mCAA0B,EAAC,IAAI,EAAE,OAAO,EAAE,oBAAoB,CAAC,CAAC;AAClE,CAAC;AAED,SAAsB,kBAAkB,CAAC,IAAU,EAAE,QAAkC;;QACrF,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;QACjD,IAAI,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,OAAO,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE;YACrD,MAAM,IAAI,KAAK,CAAC,aAAc,OAAO,CAAC,IAAK,kBAAkB,CAAC,CAAC;SAChE;QAED,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAExB,MAAM,oBAAoB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAE1C,IAAI,CAAC,OAAO,CAAC,UAAU,EAAE;YACvB,MAAM,IAAA,oBAAW,EAAC,IAAI,CAAC,CAAC;SACzB;QAED,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAEnC,CAAC;CAAA;AAhBD,gDAgBC;AAED,kBAAe,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "http://json-schema.org/schema",
|
|
3
|
+
"$id": "Schematic",
|
|
4
|
+
"title": "",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"project": {
|
|
8
|
+
"type": "string",
|
|
9
|
+
"description": "The name of the project.",
|
|
10
|
+
"alias": "p",
|
|
11
|
+
"$default": {
|
|
12
|
+
"$source": "projectName"
|
|
13
|
+
},
|
|
14
|
+
"x-prompt": "What is the name of the project for the schematic?",
|
|
15
|
+
"x-priority": "important"
|
|
16
|
+
},
|
|
17
|
+
"name": {
|
|
18
|
+
"type": "string",
|
|
19
|
+
"description": "Schematic name.",
|
|
20
|
+
"$default": {
|
|
21
|
+
"$source": "argv",
|
|
22
|
+
"index": 0
|
|
23
|
+
},
|
|
24
|
+
"x-prompt": "What name would you like to use for the schematic?",
|
|
25
|
+
"x-priority": "important"
|
|
26
|
+
},
|
|
27
|
+
"description": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Schematic description.",
|
|
30
|
+
"alias": "d"
|
|
31
|
+
},
|
|
32
|
+
"skipFormat": {
|
|
33
|
+
"type": "boolean",
|
|
34
|
+
"default": false,
|
|
35
|
+
"description": "Do not format files with prettier.",
|
|
36
|
+
"x-priority": "internal"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
"required": [
|
|
40
|
+
"project",
|
|
41
|
+
"name"
|
|
42
|
+
]
|
|
43
|
+
}
|
package/src/index.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { initGenerator as AngularInitGenerator } from './generators/init/generator';
|
|
2
|
+
export { initLibraryGenerator as AngularInitLibraryGenerator } from './generators/init-library/generator';
|
|
3
|
+
export { initApplicationGenerator as AngularInitApplicationGenerator } from './generators/init-application/generator';
|
package/src/index.js
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AngularInitApplicationGenerator = exports.AngularInitLibraryGenerator = exports.AngularInitGenerator = void 0;
|
|
4
|
+
var generator_1 = require("./generators/init/generator");
|
|
5
|
+
Object.defineProperty(exports, "AngularInitGenerator", { enumerable: true, get: function () { return generator_1.initGenerator; } });
|
|
6
|
+
var generator_2 = require("./generators/init-library/generator");
|
|
7
|
+
Object.defineProperty(exports, "AngularInitLibraryGenerator", { enumerable: true, get: function () { return generator_2.initLibraryGenerator; } });
|
|
8
|
+
var generator_3 = require("./generators/init-application/generator");
|
|
9
|
+
Object.defineProperty(exports, "AngularInitApplicationGenerator", { enumerable: true, get: function () { return generator_3.initApplicationGenerator; } });
|
|
10
|
+
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../packages/plugin/angular/src/index.ts"],"names":[],"mappings":";;;AAAA,yDAAoF;AAA3E,iHAAA,aAAa,OAAwB;AAC9C,iEAA0G;AAAjG,wHAAA,oBAAoB,OAA+B;AAC5D,qEAAsH;AAA7G,4HAAA,wBAAwB,OAAmC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function SkipNonAngularProject(tree: any, options: any, project: any, projectName: any): boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SkipNonAngularProject = void 0;
|
|
4
|
+
const generator_utilities_1 = require("@rxap/generator-utilities");
|
|
5
|
+
function SkipNonAngularProject(tree, options, project, projectName) {
|
|
6
|
+
var _a, _b, _c, _d;
|
|
7
|
+
if ((0, generator_utilities_1.SkipProject)(tree, options, project, projectName)) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
if (!((_a = project.tags) === null || _a === void 0 ? void 0 : _a.includes('angular')) && !((_b = project.tags) === null || _b === void 0 ? void 0 : _b.includes('ngx'))) {
|
|
11
|
+
return true;
|
|
12
|
+
}
|
|
13
|
+
if (((_c = project.tags) === null || _c === void 0 ? void 0 : _c.includes('plugin')) || ((_d = project.tags) === null || _d === void 0 ? void 0 : _d.includes('schematic'))) {
|
|
14
|
+
return true;
|
|
15
|
+
}
|
|
16
|
+
return false;
|
|
17
|
+
}
|
|
18
|
+
exports.SkipNonAngularProject = SkipNonAngularProject;
|
|
19
|
+
//# sourceMappingURL=skip-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skip-project.js","sourceRoot":"","sources":["../../../../../../packages/plugin/angular/src/lib/skip-project.ts"],"names":[],"mappings":";;;AAAA,mEAAwD;AAExD,SAAgB,qBAAqB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW;;IACvE,IAAI,IAAA,iCAAW,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,CAAC,EAAE;QACpD,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,QAAQ,CAAC,SAAS,CAAC,CAAA,IAAI,CAAC,CAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,QAAQ,CAAC,KAAK,CAAC,CAAA,EAAE;QACxE,OAAO,IAAI,CAAC;KACb;IACD,IAAI,CAAA,MAAA,OAAO,CAAC,IAAI,0CAAE,QAAQ,CAAC,QAAQ,CAAC,MAAI,MAAA,OAAO,CAAC,IAAI,0CAAE,QAAQ,CAAC,WAAW,CAAC,CAAA,EAAE;QAC3E,OAAO,IAAI,CAAC;KACb;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAXD,sDAWC"}
|