@ng-doc/add 15.0.0-beta.12 → 15.0.0-beta.14
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/schematics/ng-add/index.js +3 -1
- package/schematics/ng-add/index.js.map +1 -1
- package/schematics/ng-add/steps/add-layout.js +1 -1
- package/schematics/ng-add/steps/add-layout.js.map +1 -1
- package/schematics/ng-add/steps/update-app-ts-config.d.ts +7 -0
- package/schematics/ng-add/steps/update-app-ts-config.js +51 -0
- package/schematics/ng-add/steps/update-app-ts-config.js.map +1 -0
package/package.json
CHANGED
|
@@ -12,6 +12,7 @@ const add_ng_doc_modules_1 = require("./steps/add-ng-doc-modules");
|
|
|
12
12
|
const add_styles_1 = require("./steps/add-styles");
|
|
13
13
|
const add_tsconfig_paths_1 = require("./steps/add-tsconfig-paths");
|
|
14
14
|
const replace_builders_1 = require("./steps/replace-builders");
|
|
15
|
+
const update_app_ts_config_1 = require("./steps/update-app-ts-config");
|
|
15
16
|
/**
|
|
16
17
|
*
|
|
17
18
|
* @param options
|
|
@@ -42,7 +43,8 @@ function ngAddSetupProject(options) {
|
|
|
42
43
|
(0, add_ng_doc_modules_1.addNgDocModules)(options),
|
|
43
44
|
(0, add_layout_1.addLayout)(options),
|
|
44
45
|
(0, add_tsconfig_paths_1.addTsconfigPaths)(options),
|
|
45
|
-
(0,
|
|
46
|
+
(0, update_app_ts_config_1.updateAppTsConfig)(options),
|
|
47
|
+
(0, add_git_ignore_1.addGitIgnore)(),
|
|
46
48
|
]);
|
|
47
49
|
}
|
|
48
50
|
exports.ngAddSetupProject = ngAddSetupProject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../libs/add/schematics/ng-add/index.ts"],"names":[],"mappings":";;;AAAA,2DAA+E;AAC/E,4DAA0F;AAC1F,uCAAgH;AAEhH,iDAAmD;AAEnD,mDAA6C;AAC7C,2DAAoD;AAC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CAAC;AAdD,sBAcC;AAED;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAChD,OAAO,IAAA,kBAAK,EAAC;QACZ,IAAA,kCAAe,EAAC,OAAO,CAAC;QACxB,IAAA,sBAAS,EAAC,OAAO,CAAC;QAClB,IAAA,sBAAS,EAAC,OAAO,CAAC;QAClB,IAAA,oCAAe,EAAC,OAAO,CAAC;QACxB,IAAA,sBAAS,EAAC,OAAO,CAAC;QAClB,IAAA,qCAAgB,EAAC,OAAO,CAAC;QACzB,IAAA,wCAAiB,EAAC,OAAO,CAAC;QAC1B,IAAA,6BAAY,GAAE;KACd,CAAC,CAAC;AACJ,CAAC;AAXD,8CAWC"}
|
|
@@ -12,7 +12,7 @@ const get_project_1 = require("../utils/get-project");
|
|
|
12
12
|
*/
|
|
13
13
|
function addLayout(options) {
|
|
14
14
|
return async (tree, context) => {
|
|
15
|
-
context.logger.info(`[INFO]: Adding
|
|
15
|
+
context.logger.info(`[INFO]: Adding NgDoc layout to the root component...`);
|
|
16
16
|
const workspace = await (0, workspace_1.getWorkspace)(tree);
|
|
17
17
|
const project = (0, get_project_1.getProject)(options, workspace);
|
|
18
18
|
if (!project) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"add-layout.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/steps/add-layout.ts"],"names":[],"mappings":";;;AAAA,wDAAgE;AAIhE,qEAAmE;AAEnE,8EAAyE;AAEzE,0EAAkE;AAClE,sDAAgD;AAEhD;;;GAGG;AACH,SAAgB,SAAS,CAAC,OAAe;IACxC,OAAO,KAAK,EAAE,IAAU,EAAE,OAAyB,EAAE,EAAE;QACtD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"add-layout.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/steps/add-layout.ts"],"names":[],"mappings":";;;AAAA,wDAAgE;AAIhE,qEAAmE;AAEnE,8EAAyE;AAEz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Config = void 0;
|
|
4
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
|
5
|
+
const ng_morph_1 = require("ng-morph");
|
|
6
|
+
const get_project_1 = require("../utils/get-project");
|
|
7
|
+
/**
|
|
8
|
+
*
|
|
9
|
+
* @param options
|
|
10
|
+
*/
|
|
11
|
+
function updateAppTsConfig(options) {
|
|
12
|
+
return async (tree, context) => {
|
|
13
|
+
return (0, workspace_1.updateWorkspace)((workspace) => {
|
|
14
|
+
context.logger.info(`[INFO]: Updating application tsconfig...`);
|
|
15
|
+
const project = (0, get_project_1.getProject)(options, workspace);
|
|
16
|
+
if (!project) {
|
|
17
|
+
context.logger.warn(`[WARNING]: Target project not found.`);
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const buildTarget = project.targets.get('build');
|
|
21
|
+
const serveTarget = project.targets.get('serve');
|
|
22
|
+
if (buildTarget) {
|
|
23
|
+
const tsConfigPath = buildTarget.options && buildTarget.options['tsConfig'];
|
|
24
|
+
tsConfigPath && updateTsConfig(tree, String(tsConfigPath));
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
context.logger.warn(`[WARNING]: "build" target was not found.`);
|
|
28
|
+
}
|
|
29
|
+
if (serveTarget) {
|
|
30
|
+
const tsConfigPath = serveTarget.options && serveTarget.options['tsConfig'];
|
|
31
|
+
tsConfigPath && updateTsConfig(tree, String(tsConfigPath));
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
context.logger.warn(`[WARNING]: "serve" target was not found.`);
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
exports.updateAppTsConfig = updateAppTsConfig;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @param tree
|
|
43
|
+
* @param path
|
|
44
|
+
* @param filePath
|
|
45
|
+
* @param projectName
|
|
46
|
+
*/
|
|
47
|
+
function updateTsConfig(tree, filePath) {
|
|
48
|
+
const json = new ng_morph_1.JSONFile(tree, filePath);
|
|
49
|
+
json.modify(['compilerOptions', 'allowSyntheticDefaultImports'], true);
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=update-app-ts-config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-app-ts-config.js","sourceRoot":"","sources":["../../../../../../libs/add/schematics/ng-add/steps/update-app-ts-config.ts"],"names":[],"mappings":";;;AACA,qEAK+C;AAC/C,uCAAkC;AAGlC,sDAAgD;AAEhD;;;GAGG;AACH,SAAgB,iBAAiB,CAAC,OAAe;IAChD,OAAO,KAAK,EAAE,IAAU,EAAE,OAAyB,EAAE,EAAE;QACtD,OAAO,IAAA,2BAAe,EAAC,CAAC,SAA8B,EAAE,EAAE;YACzD,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;YAEhE,MAAM,OAAO,GAAkC,IAAA,wBAAU,EAAC,OAAO,EAAE,SAAS,CAAC,CAAC;YAE9E,IAAI,CAAC,OAAO,EAAE;gBACb,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;gBAC5D,OAAO;aACP;YAED,MAAM,WAAW,GAAiC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAC/E,MAAM,WAAW,GAAiC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YAE/E,IAAI,WAAW,EAAE;gBAChB,MAAM,YAAY,GACjB,WAAW,CAAC,OAAO,IAAK,WAAW,CAAC,OAAO,CAAC,UAAU,CAAY,CAAC;gBAEpE,YAAY,IAAI,cAAc,CAAC,IAAI,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;aAC3D;iBAAM;gBACN,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;aAChE;YAED,IAAI,WAAW,EAAE;gBAChB,MAAM,YAAY,GACjB,WAAW,CAAC,OAAO,IAAK,WAAW,CAAC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