@ngx-formly/schematics 6.1.2 → 6.1.4-next.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/package.json +2 -2
- package/src/ng-add/index_spec.d.ts +1 -0
- package/src/ng-add/index_spec.js +100 -0
- package/src/ng-add/index_spec.js.map +1 -0
- package/src/ng-add/schema.d.ts +2 -1
- package/src/wrapper-component/index.d.ts +10 -0
- package/src/wrapper-component/index.js +23 -0
- package/src/wrapper-component/index.js.map +1 -0
- package/src/wrapper-component/index_spec.d.ts +1 -0
- package/src/wrapper-component/index_spec.js +55 -0
- package/src/wrapper-component/index_spec.js.map +1 -0
- package/src/wrapper-component/schema.d.ts +3 -0
- package/src/wrapper-component/schema.js +3 -0
- package/src/wrapper-component/schema.js.map +1 -0
- package/utils/ast.d.ts +11 -2
- package/utils/ast.js +23 -2
- package/utils/ast.js.map +1 -1
- package/utils/html.d.ts +18 -0
- package/utils/html.js +60 -0
- package/utils/html.js.map +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ngx-formly/schematics",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.4-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "tsc -p tsconfig.lib.json"
|
|
@@ -23,4 +23,4 @@
|
|
|
23
23
|
"bugs": {
|
|
24
24
|
"url": "https://github.com/ngx-formly/ngx-formly/issues"
|
|
25
25
|
}
|
|
26
|
-
}
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
4
|
+
const path_1 = require("path");
|
|
5
|
+
const test_1 = require("@schematics/angular/utility/test");
|
|
6
|
+
const testing_2 = require("../../utils/testing");
|
|
7
|
+
describe('ng-add-schematic', () => {
|
|
8
|
+
const collectionPath = path_1.join(__dirname, '../collection.json');
|
|
9
|
+
const schematicRunner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
10
|
+
const projectPath = testing_2.getTestProjectPath();
|
|
11
|
+
let appTree;
|
|
12
|
+
beforeEach(() => {
|
|
13
|
+
appTree = testing_2.createWorkspace(schematicRunner, appTree);
|
|
14
|
+
});
|
|
15
|
+
it('should update package.json', () => {
|
|
16
|
+
const tree = schematicRunner.runSchematic('ng-add', {}, appTree);
|
|
17
|
+
const packageJson = JSON.parse(test_1.getFileContent(tree, '/package.json'));
|
|
18
|
+
expect(packageJson.dependencies['@angular/forms']).toBeDefined();
|
|
19
|
+
expect(packageJson.dependencies['@ngx-formly/core']).toBeDefined();
|
|
20
|
+
});
|
|
21
|
+
it('should not add a theme by default to package.json', () => {
|
|
22
|
+
const tree = schematicRunner.runSchematic('ng-add', {}, appTree);
|
|
23
|
+
const packageJson = JSON.parse(test_1.getFileContent(tree, '/package.json'));
|
|
24
|
+
// @TODO: list of themes should probably be retrieved from some config file
|
|
25
|
+
['material', 'bootstrap', 'ionic', 'primeng', 'kendo', 'ng-zorro-antd'].forEach(theme => {
|
|
26
|
+
expect(packageJson.dependencies[`@ngx-formly/${theme}`]).toBeUndefined();
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
it('should skip package.json update', () => {
|
|
30
|
+
const options = { skipPackageJson: true };
|
|
31
|
+
const tree = schematicRunner.runSchematic('ng-add', options, appTree);
|
|
32
|
+
const packageJson = JSON.parse(test_1.getFileContent(tree, '/package.json'));
|
|
33
|
+
expect(packageJson.dependencies['@ngx-formly/core']).toBeUndefined();
|
|
34
|
+
});
|
|
35
|
+
it('should add to root app module', () => {
|
|
36
|
+
const tree = schematicRunner.runSchematic('ng-add', {}, appTree);
|
|
37
|
+
const content = tree.readContent(`${projectPath}/src/app/app.module.ts`);
|
|
38
|
+
expect(content).toMatch(
|
|
39
|
+
// tslint:disable-next-line:trailing-comma
|
|
40
|
+
/import { FormlyModule } from '@ngx-formly\/core';/);
|
|
41
|
+
expect(content).toMatch(
|
|
42
|
+
// tslint:disable-next-line:trailing-comma
|
|
43
|
+
/FormlyModule.forRoot/);
|
|
44
|
+
expect(content).toMatch(
|
|
45
|
+
// tslint:disable-next-line:trailing-comma
|
|
46
|
+
/import { ReactiveFormsModule } from '@angular\/forms';/);
|
|
47
|
+
expect(content).toMatch(
|
|
48
|
+
// tslint:disable-next-line:trailing-comma
|
|
49
|
+
/ReactiveFormsModule,/);
|
|
50
|
+
});
|
|
51
|
+
it('should add UI theme to package.json', () => {
|
|
52
|
+
const tree = schematicRunner.runSchematic('ng-add', {
|
|
53
|
+
uiTheme: 'bootstrap',
|
|
54
|
+
}, appTree);
|
|
55
|
+
const packageJson = JSON.parse(test_1.getFileContent(tree, '/package.json'));
|
|
56
|
+
expect(packageJson.dependencies['@ngx-formly/bootstrap']).toBeDefined();
|
|
57
|
+
});
|
|
58
|
+
it('should add UI theme to root app module', () => {
|
|
59
|
+
const tree = schematicRunner.runSchematic('ng-add', {
|
|
60
|
+
uiTheme: 'bootstrap',
|
|
61
|
+
}, appTree);
|
|
62
|
+
const content = tree.readContent(`${projectPath}/src/app/app.module.ts`);
|
|
63
|
+
expect(content).toMatch(
|
|
64
|
+
// tslint:disable-next-line:trailing-comma
|
|
65
|
+
/import { FormlyBootstrapModule } from '@ngx-formly\/bootstrap';/);
|
|
66
|
+
expect(content).toMatch(
|
|
67
|
+
// tslint:disable-next-line:trailing-comma
|
|
68
|
+
/FormlyBootstrapModule/);
|
|
69
|
+
});
|
|
70
|
+
it('should add to any module', () => {
|
|
71
|
+
const fooModule = `${projectPath}/src/app/foo.module.ts`;
|
|
72
|
+
appTree.create(fooModule, `
|
|
73
|
+
import { NgModule } from '@angular/core';
|
|
74
|
+
import { CommonModule } from '@angular/common';
|
|
75
|
+
|
|
76
|
+
@NgModule({
|
|
77
|
+
imports: [],
|
|
78
|
+
declarations: []
|
|
79
|
+
})
|
|
80
|
+
export class FooModule { }
|
|
81
|
+
`);
|
|
82
|
+
const tree = schematicRunner.runSchematic('ng-add', {
|
|
83
|
+
module: 'app/foo.module.ts',
|
|
84
|
+
}, appTree);
|
|
85
|
+
const content = tree.readContent(fooModule);
|
|
86
|
+
expect(content).toMatch(
|
|
87
|
+
// tslint:disable-next-line:trailing-comma
|
|
88
|
+
/import { FormlyModule } from '@ngx-formly\/core';/);
|
|
89
|
+
expect(content).toMatch(
|
|
90
|
+
// tslint:disable-next-line:trailing-comma
|
|
91
|
+
/FormlyModule.forRoot/);
|
|
92
|
+
expect(content).toMatch(
|
|
93
|
+
// tslint:disable-next-line:trailing-comma
|
|
94
|
+
/import { ReactiveFormsModule } from '@angular\/forms';/);
|
|
95
|
+
expect(content).toMatch(
|
|
96
|
+
// tslint:disable-next-line:trailing-comma
|
|
97
|
+
/ReactiveFormsModule,/);
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
//# sourceMappingURL=index_spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;AAAA,gEAAuF;AACvF,+BAA4B;AAC5B,2DAAkE;AAClE,iDAA0E;AAG1E,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IAChC,MAAM,cAAc,GAAG,WAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAC7D,MAAM,eAAe,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAC9E,MAAM,WAAW,GAAG,4BAAkB,EAAE,CAAC;IAEzC,IAAI,OAAqB,CAAC;IAE1B,UAAU,CAAC,GAAG,EAAE;QACd,OAAO,GAAG,yBAAe,CAAC,eAAe,EAAE,OAAO,CAAC,CAAC;IACtD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4BAA4B,EAAE,GAAG,E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,CAAC,GAAG,WAAW,wBAAwB,CAAC,CAAC;QACzE,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO;QACrB,0CAA0C;QAC1C,iEAAiE,CAClE,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO;QACrB,0CAA0C;QAC1C,uBAAuB,CACxB,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,SAAS,GAAG,GAAG,WAAW,wBAAwB,CAAC;QAEzD,OAAO,CAAC,MAAM,CAAC,SAAS,EAAE;;;;;;;;;KASzB,CAAC,CAAC;QAEH,MAAM,IAAI,GAAG,eAAe,CAAC,YAAY,CAAC,QAAQ,EAAE;YAClD,MAAM,EAAE,mBAAmB;SAC5B,EAAE,OAAO,CAAC,CAAC;QAEZ,MAAM,OAAO,GAAG,IAAI,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC;QAE5C,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO;QACrB,0CAA0C;QAC1C,mDAAmD,CACpD,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO;QACrB,0CAA0C;QAC1C,sBAAsB,CACvB,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO;QACrB,0CAA0C;QAC1C,wDAAwD,CACzD,CAAC;QACF,MAAM,CAAC,OAAO,CAAC,CAAC,OAAO;QACrB,0CAA0C;QAC1C,sBAAsB,CACvB,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/src/ng-add/schema.d.ts
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Rule } from '@angular-devkit/schematics';
|
|
2
|
+
import { Schema } from './schema';
|
|
3
|
+
/**
|
|
4
|
+
* Scaffolds a new wrapper component.
|
|
5
|
+
* Internally it bootstraps the base component schematic
|
|
6
|
+
*/
|
|
7
|
+
export default function (options: Schema): Rule;
|
|
8
|
+
/**
|
|
9
|
+
* Add the wrapper component to FormlyModule
|
|
10
|
+
*/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
+
const component_1 = require("@schematics/angular/component");
|
|
5
|
+
/**
|
|
6
|
+
* Scaffolds a new wrapper component.
|
|
7
|
+
* Internally it bootstraps the base component schematic
|
|
8
|
+
*/
|
|
9
|
+
function default_1(options) {
|
|
10
|
+
return schematics_1.chain([
|
|
11
|
+
component_1.default(Object.assign({}, options)),
|
|
12
|
+
]);
|
|
13
|
+
}
|
|
14
|
+
exports.default = default_1;
|
|
15
|
+
/**
|
|
16
|
+
* Add the wrapper component to FormlyModule
|
|
17
|
+
*/
|
|
18
|
+
// function addWrapperToModule(options: Schema) {
|
|
19
|
+
// return (host: Tree) => {
|
|
20
|
+
// return host;
|
|
21
|
+
// };
|
|
22
|
+
// }
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;AAAA,2DAAyD;AACzD,6DAA2D;AAG3D;;;GAGG;AACH,mBAAwB,OAAe;IACrC,OAAO,kBAAK,CAAC;QACX,mBAAc,mBAAM,OAAO,EAAG;KAE/B,CAAC,CAAC;AACL,CAAC;AALD,4BAKC;AAED;;GAEG;AACH,iDAAiD;AACjD,6BAA6B;AAC7B,mBAAmB;AACnB,OAAO;AACP,IAAI"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
/**
|
|
4
|
+
* @license
|
|
5
|
+
* Copyright Google Inc. All Rights Reserved.
|
|
6
|
+
*
|
|
7
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
8
|
+
* found in the LICENSE file at https://angular.io/license
|
|
9
|
+
*/
|
|
10
|
+
const testing_1 = require("@angular-devkit/schematics/testing");
|
|
11
|
+
const path_1 = require("path");
|
|
12
|
+
const testing_2 = require("../../utils/testing");
|
|
13
|
+
const test_1 = require("@schematics/angular/utility/test");
|
|
14
|
+
const schema_1 = require("@schematics/angular/component/schema");
|
|
15
|
+
// tslint:disable:max-line-length
|
|
16
|
+
xdescribe('Component Schematic', () => {
|
|
17
|
+
const collectionPath = path_1.join(__dirname, '../collection.json');
|
|
18
|
+
const defaultOptions = {
|
|
19
|
+
name: 'foo',
|
|
20
|
+
path: 'src/app',
|
|
21
|
+
inlineStyle: false,
|
|
22
|
+
inlineTemplate: false,
|
|
23
|
+
changeDetection: schema_1.ChangeDetection.Default,
|
|
24
|
+
styleext: 'css',
|
|
25
|
+
spec: true,
|
|
26
|
+
module: undefined,
|
|
27
|
+
export: false,
|
|
28
|
+
project: 'bar',
|
|
29
|
+
};
|
|
30
|
+
const schematicRunner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
|
31
|
+
const projectPath = testing_2.getTestProjectPath();
|
|
32
|
+
let appTree;
|
|
33
|
+
beforeEach(() => {
|
|
34
|
+
appTree = testing_2.createWorkspace(schematicRunner, appTree);
|
|
35
|
+
});
|
|
36
|
+
it('should create a component', () => {
|
|
37
|
+
const tree = schematicRunner.runSchematic('wrapper', Object.assign({}, defaultOptions), appTree);
|
|
38
|
+
const files = tree.files;
|
|
39
|
+
expect(files.indexOf(`${projectPath}/src/app/foo/foo.component.css`)).toBeGreaterThanOrEqual(0);
|
|
40
|
+
expect(files.indexOf(`${projectPath}/src/app/foo/foo.component.html`)).toBeGreaterThanOrEqual(0);
|
|
41
|
+
expect(files.indexOf(`${projectPath}/src/app/foo/foo.component.spec.ts`)).toBeGreaterThanOrEqual(0);
|
|
42
|
+
expect(files.indexOf(`${projectPath}/src/app/foo/foo.component.ts`)).toBeGreaterThanOrEqual(0);
|
|
43
|
+
const moduleContent = test_1.getFileContent(tree, `${projectPath}/src/app/app.module.ts`);
|
|
44
|
+
expect(moduleContent).toMatch(/import.*Foo.*from '.\/foo\/foo.component'/);
|
|
45
|
+
expect(moduleContent).toMatch(/declarations:\s*\[[^\]]+?,\r?\n\s+FooComponent\r?\n/m);
|
|
46
|
+
});
|
|
47
|
+
xit('should add wrapper to FormlyModule config', () => {
|
|
48
|
+
const tree = schematicRunner.runSchematic('wrapper', Object.assign({}, defaultOptions), appTree);
|
|
49
|
+
const moduleContent = test_1.getFileContent(tree, `${projectPath}/src/app/app.module.ts`);
|
|
50
|
+
expect(moduleContent).toContain(`wrappers: [
|
|
51
|
+
{ name: 'foo', component: FooWrapperComponent },
|
|
52
|
+
],`);
|
|
53
|
+
});
|
|
54
|
+
});
|
|
55
|
+
//# sourceMappingURL=index_spec.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;AAAA;;;;;;GAMG;AACH,gEAAuF;AACvF,+BAA4B;AAC5B,iDAA0E;AAE1E,2DAAkE;AAClE,iEAAuE;AAEvE,iCAAiC;AACjC,SAAS,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACpC,MAAM,cAAc,GAAG,WAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IAC7D,MAAM,cAAc,GAAqB;QACvC,IAAI,EAAE,KAAK;QACX,IAAI,EAAE,SAAS;QACf,WAAW,EAAE,KAAK;QAClB,cAAc,EAAE,KAAK;QACrB,eAAe,EAAE,wBAAe,CAAC,OAAO;QACxC,QAAQ,EAAE,KAAK;QACf,IAAI,EAAE,IAAI;QACV,MAAM,EAAE,SAAS;QACjB,MAAM,EAAE,KAAK;QACb,OAAO,EAAE,KAAK;KACf,CAAC;IACF,MAAM,eAAe,GAAG,IAAI,6BAAmB,CAAC,YAAY,EAAE,cAAc,CAAC,CAAC;IAC9E,MAAM,WAAW,GAAG,4BAAkB,EAAE,C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wB,CAAC,CAAC;QAEnF,MAAM,CAAC,aAAa,CAAC,CAAC,SAAS,CAAC;;OAE7B,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["schema.ts"],"names":[],"mappings":""}
|
package/utils/ast.d.ts
CHANGED
|
@@ -1,10 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* https://github.com/angular/components/tree/main/src/cdk/schematics
|
|
3
|
+
*/
|
|
1
4
|
import { Tree } from '@angular-devkit/schematics';
|
|
2
5
|
import * as ts from 'typescript';
|
|
3
6
|
import { WorkspaceProject } from '@schematics/angular/utility/workspace-models';
|
|
7
|
+
import { Schema as ComponentOptions } from '@schematics/angular/component/schema';
|
|
8
|
+
import { Path } from '@angular-devkit/core';
|
|
9
|
+
import { JsonValue } from '@angular-devkit/core';
|
|
10
|
+
import { ProjectDefinition } from '@angular-devkit/core/src/workspace';
|
|
4
11
|
/** Reads file given path and returns TypeScript source file. */
|
|
5
12
|
export declare function parseSourceFile(host: Tree, path: string): ts.SourceFile;
|
|
6
13
|
/** Import and add module to root app module. */
|
|
7
|
-
export declare function addModuleImportToRootModule(host: Tree, moduleName: string, src: string, project:
|
|
14
|
+
export declare function addModuleImportToRootModule(host: Tree, moduleName: string, src: string, project: ProjectDefinition): void;
|
|
8
15
|
/**
|
|
9
16
|
* Import and add module to specific module path.
|
|
10
17
|
* @param host the tree we are updating
|
|
@@ -18,4 +25,6 @@ export declare function getIndexHtmlPath(host: Tree, project: WorkspaceProject):
|
|
|
18
25
|
/** Get the root stylesheet file. */
|
|
19
26
|
export declare function getStylesPath(host: Tree, project: WorkspaceProject): string;
|
|
20
27
|
/** Wraps the internal find module from options with undefined path handling */
|
|
21
|
-
export declare function findModuleFromOptions(host: Tree, options:
|
|
28
|
+
export declare function findModuleFromOptions(host: Tree, options: ComponentOptions): Promise<string | undefined>;
|
|
29
|
+
export declare function getProjectMainFile(project: ProjectDefinition): Path;
|
|
30
|
+
export declare function getProjectTargetOptions(project: ProjectDefinition, buildTarget: string): Record<string, JsonValue | undefined>;
|
package/utils/ast.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* https://github.com/angular/components/tree/main/src/cdk/schematics
|
|
4
|
+
*/
|
|
2
5
|
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
6
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
7
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
@@ -9,7 +12,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
12
|
});
|
|
10
13
|
};
|
|
11
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.findModuleFromOptions = exports.getStylesPath = exports.getIndexHtmlPath = exports.addModuleImportToModule = exports.addModuleImportToRootModule = exports.parseSourceFile = void 0;
|
|
15
|
+
exports.getProjectTargetOptions = exports.getProjectMainFile = exports.findModuleFromOptions = exports.getStylesPath = exports.getIndexHtmlPath = exports.addModuleImportToModule = exports.addModuleImportToRootModule = exports.parseSourceFile = void 0;
|
|
13
16
|
const core_1 = require("@angular-devkit/core");
|
|
14
17
|
const schematics_1 = require("@angular-devkit/schematics");
|
|
15
18
|
const ts = require("typescript");
|
|
@@ -29,7 +32,7 @@ function parseSourceFile(host, path) {
|
|
|
29
32
|
exports.parseSourceFile = parseSourceFile;
|
|
30
33
|
/** Import and add module to root app module. */
|
|
31
34
|
function addModuleImportToRootModule(host, moduleName, src, project) {
|
|
32
|
-
const modulePath = (0, ng_ast_utils_1.getAppModulePath)(host, project
|
|
35
|
+
const modulePath = (0, ng_ast_utils_1.getAppModulePath)(host, getProjectMainFile(project));
|
|
33
36
|
addModuleImportToModule(host, modulePath, moduleName, src);
|
|
34
37
|
}
|
|
35
38
|
exports.addModuleImportToRootModule = addModuleImportToRootModule;
|
|
@@ -99,4 +102,22 @@ function findModuleFromOptions(host, options) {
|
|
|
99
102
|
});
|
|
100
103
|
}
|
|
101
104
|
exports.findModuleFromOptions = findModuleFromOptions;
|
|
105
|
+
function getProjectMainFile(project) {
|
|
106
|
+
const buildOptions = getProjectTargetOptions(project, 'build');
|
|
107
|
+
if (!buildOptions.main) {
|
|
108
|
+
throw new schematics_1.SchematicsException(`Could not find the project main file inside of the ` +
|
|
109
|
+
`workspace config (${project.sourceRoot})`);
|
|
110
|
+
}
|
|
111
|
+
return buildOptions.main;
|
|
112
|
+
}
|
|
113
|
+
exports.getProjectMainFile = getProjectMainFile;
|
|
114
|
+
function getProjectTargetOptions(project, buildTarget) {
|
|
115
|
+
var _a, _b;
|
|
116
|
+
const options = (_b = (_a = project.targets) === null || _a === void 0 ? void 0 : _a.get(buildTarget)) === null || _b === void 0 ? void 0 : _b.options;
|
|
117
|
+
if (!options) {
|
|
118
|
+
throw new schematics_1.SchematicsException(`Cannot determine project target configuration for: ${buildTarget}.`);
|
|
119
|
+
}
|
|
120
|
+
return options;
|
|
121
|
+
}
|
|
122
|
+
exports.getProjectTargetOptions = getProjectTargetOptions;
|
|
102
123
|
//# sourceMappingURL=ast.js.map
|
package/utils/ast.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ast.js","sourceRoot":"","sources":["ast.ts"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"ast.js","sourceRoot":"","sources":["ast.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;AAEH,+CAAiD;AACjD,2DAAuE;AACvE,iCAAiC;AACjC,qEAA0E;AAC1E,+DAAkE;AAClE,2EAA4E;AAC5E,yEAAsG;AAEtG,qEAAqE;AAMrE,gEAAgE;AAChE,SAAgB,eAAe,CAAC,IAAU,EAAE,IAAY;IACtD,MAAM,MAAM,GAAG,IAAI,CAAC,I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C,OAAO,EAAE;QACZ,MAAM,IAAI,gCAAmB,CAC3B,sDAAsD,WAAW,GAAG,CACrE,CAAC;KACH;IAED,OAAO,OAAO,CAAC;AACjB,CAAC;AAbD,0DAaC"}
|
package/utils/html.d.ts
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
|
2
|
+
import { WorkspaceProject } from '@angular-devkit/core/src/workspace';
|
|
3
|
+
/**
|
|
4
|
+
* Parses the index.html file to get the HEAD tag position.
|
|
5
|
+
* @param host the tree we are traversing
|
|
6
|
+
* @param src the src path of the html file to parse
|
|
7
|
+
*/
|
|
8
|
+
export declare function getHeadTag(host: Tree, src: string): {
|
|
9
|
+
position: any;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Adds a link to the index.html head tag Example:
|
|
13
|
+
* `<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">`
|
|
14
|
+
* @param host The tree we are updating
|
|
15
|
+
* @param project The project we're targeting.
|
|
16
|
+
* @param link html element string we are inserting.
|
|
17
|
+
*/
|
|
18
|
+
export declare function addHeadLink(host: Tree, project: WorkspaceProject, link: string): void;
|
package/utils/html.js
ADDED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
|
4
|
+
const parse5 = require("parse5");
|
|
5
|
+
const ast_1 = require("./ast");
|
|
6
|
+
const change_1 = require("@schematics/angular/utility/change");
|
|
7
|
+
/**
|
|
8
|
+
* Parses the index.html file to get the HEAD tag position.
|
|
9
|
+
* @param host the tree we are traversing
|
|
10
|
+
* @param src the src path of the html file to parse
|
|
11
|
+
*/
|
|
12
|
+
function getHeadTag(host, src) {
|
|
13
|
+
const document = parse5.parse(src, { locationInfo: true });
|
|
14
|
+
let head;
|
|
15
|
+
const visit = (nodes) => {
|
|
16
|
+
nodes.forEach(node => {
|
|
17
|
+
const element = node;
|
|
18
|
+
if (element.tagName === 'head') {
|
|
19
|
+
head = element;
|
|
20
|
+
}
|
|
21
|
+
else {
|
|
22
|
+
if (element.childNodes) {
|
|
23
|
+
visit(element.childNodes);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
visit(document.childNodes);
|
|
29
|
+
if (!head) {
|
|
30
|
+
throw new schematics_1.SchematicsException('Head element not found!');
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
position: head.__location.startTag.endOffset,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
exports.getHeadTag = getHeadTag;
|
|
37
|
+
/**
|
|
38
|
+
* Adds a link to the index.html head tag Example:
|
|
39
|
+
* `<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">`
|
|
40
|
+
* @param host The tree we are updating
|
|
41
|
+
* @param project The project we're targeting.
|
|
42
|
+
* @param link html element string we are inserting.
|
|
43
|
+
*/
|
|
44
|
+
function addHeadLink(host, project, link) {
|
|
45
|
+
const indexPath = ast_1.getIndexHtmlPath(host, project);
|
|
46
|
+
const buffer = host.read(indexPath);
|
|
47
|
+
if (!buffer) {
|
|
48
|
+
throw new schematics_1.SchematicsException(`Could not find file for path: ${indexPath}`);
|
|
49
|
+
}
|
|
50
|
+
const src = buffer.toString();
|
|
51
|
+
if (src.indexOf(link) === -1) {
|
|
52
|
+
const node = getHeadTag(host, src);
|
|
53
|
+
const insertion = new change_1.InsertChange(indexPath, node.position, link);
|
|
54
|
+
const recorder = host.beginUpdate(indexPath);
|
|
55
|
+
recorder.insertLeft(insertion.pos, insertion.toAdd);
|
|
56
|
+
host.commitUpdate(recorder);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
exports.addHeadLink = addHeadLink;
|
|
60
|
+
//# sourceMappingURL=html.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"html.js","sourceRoot":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