devextreme-schematics 1.2.23 → 1.3.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/LICENSE +21 -21
- package/package.json +7 -7
- package/src/add-app-template/index.d.ts +2 -2
- package/src/add-app-template/index.js +26 -26
- package/src/add-app-template/index_spec.d.ts +1 -1
- package/src/add-app-template/index_spec.js +70 -69
- package/src/add-app-template/index_spec.js.map +1 -1
- package/src/add-app-template/schema.json +2 -2
- package/src/add-layout/files/devextreme.json +1 -1
- package/src/add-layout/files/src/app/shared/services/screen.service.ts +1 -1
- package/src/add-layout/files/src/dx-styles.scss +4 -0
- package/src/add-layout/index.d.ts +2 -2
- package/src/add-layout/index.js +277 -266
- package/src/add-layout/index.js.map +1 -1
- package/src/add-layout/index.ts +28 -30
- package/src/add-layout/index_spec.d.ts +1 -1
- package/src/add-layout/index_spec.js +251 -250
- package/src/add-layout/index_spec.js.map +1 -1
- package/src/add-layout/index_spec.ts +2 -2
- package/src/add-layout/schema.json +2 -2
- package/src/add-sample-views/index.d.ts +2 -2
- package/src/add-sample-views/index.js +97 -88
- package/src/add-sample-views/index.js.map +1 -1
- package/src/add-sample-views/index.ts +3 -3
- package/src/add-sample-views/index_spec.d.ts +1 -1
- package/src/add-sample-views/index_spec.js +53 -52
- package/src/add-sample-views/index_spec.js.map +1 -1
- package/src/add-sample-views/index_spec.ts +1 -1
- package/src/add-sample-views/schema.json +1 -1
- package/src/add-view/index.d.ts +3 -3
- package/src/add-view/index.js +125 -113
- package/src/add-view/index.js.map +1 -1
- package/src/add-view/index.ts +14 -13
- package/src/add-view/index_spec.d.ts +1 -1
- package/src/add-view/index_spec.js +109 -108
- package/src/add-view/index_spec.js.map +1 -1
- package/src/add-view/schema.json +1 -1
- package/src/install/index.d.ts +2 -2
- package/src/install/index.js +76 -63
- package/src/install/index.js.map +1 -1
- package/src/install/index.ts +4 -2
- package/src/install/index_spec.d.ts +1 -1
- package/src/install/index_spec.js +96 -95
- package/src/install/index_spec.js.map +1 -1
- package/src/install/index_spec.ts +1 -1
- package/src/install/schema.json +1 -1
- package/src/utility/array.d.ts +1 -1
- package/src/utility/array.js +7 -6
- package/src/utility/array.js.map +1 -1
- package/src/utility/change.d.ts +7 -7
- package/src/utility/change.js +49 -48
- package/src/utility/change.js.map +1 -1
- package/src/utility/latest-versions.d.ts +5 -5
- package/src/utility/latest-versions.js +9 -8
- package/src/utility/latest-versions.js.map +1 -1
- package/src/utility/modify-json-file.d.ts +3 -2
- package/src/utility/modify-json-file.js +15 -11
- package/src/utility/modify-json-file.js.map +1 -1
- package/src/utility/modify-json-file.ts +6 -3
- package/src/utility/project.d.ts +5 -5
- package/src/utility/project.js +48 -25
- package/src/utility/project.js.map +1 -1
- package/src/utility/project.ts +19 -14
- package/src/utility/routing.d.ts +4 -4
- package/src/utility/routing.js +32 -31
- package/src/utility/routing.js.map +1 -1
- package/src/utility/source.d.ts +3 -3
- package/src/utility/source.js +13 -12
- package/src/utility/source.js.map +1 -1
- package/src/utility/string.d.ts +1 -1
- package/src/utility/string.js +8 -7
- package/src/utility/string.js.map +1 -1
- package/src/utility/styles.d.ts +1 -2
- package/src/utility/styles.js +29 -30
- package/src/utility/styles.js.map +1 -1
- package/src/utility/styles.ts +2 -5
@@ -1,9 +1,10 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
'devextreme
|
7
|
-
'devextreme-
|
8
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.latestVersions = void 0;
|
4
|
+
// TODO: implement
|
5
|
+
exports.latestVersions = {
|
6
|
+
'devextreme': '^21.2.4',
|
7
|
+
'devextreme-angular': '^21.2.4',
|
8
|
+
'devextreme-cli': 'latest'
|
9
|
+
};
|
9
10
|
//# sourceMappingURL=latest-versions.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"latest-versions.js","sourceRoot":"","sources":["latest-versions.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"latest-versions.js","sourceRoot":"","sources":["latest-versions.ts"],"names":[],"mappings":";;;AAAA,kBAAkB;AACL,QAAA,cAAc,GAAG;IAC5B,YAAY,EAAE,SAAS;IACvB,oBAAoB,EAAE,SAAS;IAC/B,gBAAgB,EAAE,QAAQ;CAC3B,CAAC"}
|
@@ -1,2 +1,3 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
export declare
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
2
|
+
export declare const parseJson: (str: string) => any;
|
3
|
+
export declare function modifyJSONFile(host: Tree, path: string, callback: (obj: any) => any): import("@angular-devkit/schematics/src/tree/interface").Tree;
|
@@ -1,12 +1,16 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.modifyJSONFile = exports.parseJson = void 0;
|
4
|
+
const parseJson = (str) => {
|
5
|
+
return JSON.parse(str.replace(/\/\*[\S\s]+?\*\/\r?\n/g, ''));
|
6
|
+
};
|
7
|
+
exports.parseJson = parseJson;
|
8
|
+
function modifyJSONFile(host, path, callback) {
|
9
|
+
const serializedConfig = host.read(path).toString();
|
10
|
+
let obj = exports.parseJson(serializedConfig);
|
11
|
+
obj = callback(obj);
|
12
|
+
host.overwrite(path, `${JSON.stringify(obj, null, 2)}\n`);
|
13
|
+
return host;
|
14
|
+
}
|
15
|
+
exports.modifyJSONFile = modifyJSONFile;
|
12
16
|
//# sourceMappingURL=modify-json-file.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"modify-json-file.js","sourceRoot":"","sources":["modify-json-file.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"modify-json-file.js","sourceRoot":"","sources":["modify-json-file.ts"],"names":[],"mappings":";;;AAEO,MAAM,SAAS,GAAG,CAAC,GAAW,EAAE,EAAE;IACvC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,wBAAwB,EAAE,EAAE,CAAC,CAAC,CAAC;AAC/D,CAAC,CAAC;AAFW,QAAA,SAAS,aAEpB;AAEF,SAAgB,cAAc,CAAC,IAAU,EAAE,IAAY,EAAE,QAA2B;IAClF,MAAM,gBAAgB,GAAG,IAAI,CAAC,IAAI,CAAC,IAAI,CAAE,CAAC,QAAQ,EAAE,CAAC;IACrD,IAAI,GAAG,GAAG,iBAAS,CAAC,gBAAgB,CAAC,CAAC;IAEtC,GAAG,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC;IAEpB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAE1D,OAAO,IAAI,CAAC;AACd,CAAC;AATD,wCASC"}
|
@@ -1,9 +1,12 @@
|
|
1
1
|
import { Tree } from '@angular-devkit/schematics';
|
2
2
|
|
3
|
+
export const parseJson = (str: string) => {
|
4
|
+
return JSON.parse(str.replace(/\/\*[\S\s]+?\*\/\r?\n/g, ''));
|
5
|
+
};
|
6
|
+
|
3
7
|
export function modifyJSONFile(host: Tree, path: string, callback: (obj: any) => any) {
|
4
|
-
|
5
|
-
|
6
|
-
let obj = JSON.parse(serializedConfig);
|
8
|
+
const serializedConfig = host.read(path)!.toString();
|
9
|
+
let obj = parseJson(serializedConfig);
|
7
10
|
|
8
11
|
obj = callback(obj);
|
9
12
|
|
package/src/utility/project.d.ts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
export declare function getProjectName(host: Tree,
|
3
|
-
export declare function getApplicationPath(host: Tree, projectName: string): string
|
4
|
-
export declare function getSourceRootPath(host: Tree, projectName: string): string
|
5
|
-
export declare function getRootPath(host: Tree, projectName: string): string
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
2
|
+
export declare function getProjectName(host: Tree, projectName: string): Promise<string>;
|
3
|
+
export declare function getApplicationPath(host: Tree, projectName: string): Promise<string>;
|
4
|
+
export declare function getSourceRootPath(host: Tree, projectName: string): Promise<string | undefined>;
|
5
|
+
export declare function getRootPath(host: Tree, projectName: string): Promise<string | undefined>;
|
package/src/utility/project.js
CHANGED
@@ -1,26 +1,49 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
function
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
}
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
exports.
|
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.getRootPath = exports.getSourceRootPath = exports.getApplicationPath = exports.getProjectName = void 0;
|
13
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
14
|
+
function getProjectName(host, projectName) {
|
15
|
+
return __awaiter(this, void 0, void 0, function* () {
|
16
|
+
const projects = [];
|
17
|
+
const workspace = yield workspace_1.getWorkspace(host);
|
18
|
+
/* tslint:disable-next-line:variable-name */
|
19
|
+
workspace.projects.forEach((_v, k) => {
|
20
|
+
projects.push(k);
|
21
|
+
});
|
22
|
+
return projectName && projects.includes(projectName) ? projectName : projects[0];
|
23
|
+
});
|
24
|
+
}
|
25
|
+
exports.getProjectName = getProjectName;
|
26
|
+
function getApplicationPath(host, projectName) {
|
27
|
+
return __awaiter(this, void 0, void 0, function* () {
|
28
|
+
const sourcePath = yield getSourceRootPath(host, projectName);
|
29
|
+
return sourcePath ? `${sourcePath}/app/` : 'src/app/';
|
30
|
+
});
|
31
|
+
}
|
32
|
+
exports.getApplicationPath = getApplicationPath;
|
33
|
+
function getSourceRootPath(host, projectName) {
|
34
|
+
return __awaiter(this, void 0, void 0, function* () {
|
35
|
+
const workspace = yield workspace_1.getWorkspace(host);
|
36
|
+
const project = workspace.projects.get(projectName);
|
37
|
+
return project && (project.sourceRoot || project.root);
|
38
|
+
});
|
39
|
+
}
|
40
|
+
exports.getSourceRootPath = getSourceRootPath;
|
41
|
+
function getRootPath(host, projectName) {
|
42
|
+
return __awaiter(this, void 0, void 0, function* () {
|
43
|
+
const workspace = yield workspace_1.getWorkspace(host);
|
44
|
+
const project = workspace.projects.get(projectName);
|
45
|
+
return project && project.root;
|
46
|
+
});
|
47
|
+
}
|
48
|
+
exports.getRootPath = getRootPath;
|
26
49
|
//# sourceMappingURL=project.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"project.js","sourceRoot":"","sources":["project.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"project.js","sourceRoot":"","sources":["project.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qEAAqE;AAErE,SAAsB,cAAc,CAAC,IAAU,EAAE,WAAmB;;QAClE,MAAM,QAAQ,GAAa,EAAE,CAAC;QAC9B,MAAM,SAAS,GAAG,MAAM,wBAAY,CAAC,IAAI,CAAC,CAAC;QAC3C,4CAA4C;QAC5C,SAAS,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE;YACnC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QACnB,CAAC,CAAC,CAAC;QAEH,OAAO,WAAW,IAAI,QAAQ,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC;IACnF,CAAC;CAAA;AATD,wCASC;AAED,SAAsB,kBAAkB,CAAC,IAAU,EAAE,WAAmB;;QACtE,MAAM,UAAU,GAAG,MAAM,iBAAiB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAC9D,OAAO,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC;IACxD,CAAC;CAAA;AAHD,gDAGC;AAED,SAAsB,iBAAiB,CAAC,IAAU,EAAE,WAAmB;;QACrE,MAAM,SAAS,GAAG,MAAM,wBAAY,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACzD,CAAC;CAAA;AAJD,8CAIC;AAED,SAAsB,WAAW,CAAC,IAAU,EAAE,WAAmB;;QAC/D,MAAM,SAAS,GAAG,MAAM,wBAAY,CAAC,IAAI,CAAC,CAAC;QAC3C,MAAM,OAAO,GAAG,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACpD,OAAO,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IACjC,CAAC;CAAA;AAJD,kCAIC"}
|
package/src/utility/project.ts
CHANGED
@@ -1,25 +1,30 @@
|
|
1
1
|
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
import { getWorkspace } from '@schematics/angular/utility/
|
2
|
+
import { getWorkspace } from '@schematics/angular/utility/workspace';
|
3
3
|
|
4
|
-
export function getProjectName(host: Tree,
|
5
|
-
const
|
6
|
-
const workspace = getWorkspace(host);
|
7
|
-
|
4
|
+
export async function getProjectName(host: Tree, projectName: string) {
|
5
|
+
const projects: string[] = [];
|
6
|
+
const workspace = await getWorkspace(host);
|
7
|
+
/* tslint:disable-next-line:variable-name */
|
8
|
+
workspace.projects.forEach((_v, k) => {
|
9
|
+
projects.push(k);
|
10
|
+
});
|
8
11
|
|
9
|
-
return projectName && projects.
|
12
|
+
return projectName && projects.includes(projectName) ? projectName : projects[0];
|
10
13
|
}
|
11
14
|
|
12
|
-
export function getApplicationPath(host: Tree, projectName: string) {
|
13
|
-
const sourcePath = getSourceRootPath(host, projectName);
|
15
|
+
export async function getApplicationPath(host: Tree, projectName: string) {
|
16
|
+
const sourcePath = await getSourceRootPath(host, projectName);
|
14
17
|
return sourcePath ? `${sourcePath}/app/` : 'src/app/';
|
15
18
|
}
|
16
19
|
|
17
|
-
export function getSourceRootPath(host: Tree, projectName: string) {
|
18
|
-
const
|
19
|
-
|
20
|
+
export async function getSourceRootPath(host: Tree, projectName: string) {
|
21
|
+
const workspace = await getWorkspace(host);
|
22
|
+
const project = workspace.projects.get(projectName);
|
23
|
+
return project && (project.sourceRoot || project.root);
|
20
24
|
}
|
21
25
|
|
22
|
-
export function getRootPath(host: Tree, projectName: string) {
|
23
|
-
const
|
24
|
-
|
26
|
+
export async function getRootPath(host: Tree, projectName: string) {
|
27
|
+
const workspace = await getWorkspace(host);
|
28
|
+
const project = workspace.projects.get(projectName);
|
29
|
+
return project && project.root;
|
25
30
|
}
|
package/src/utility/routing.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { Node, SourceFile } from 'typescript';
|
2
|
-
export declare function hasComponentInRoutes(routes: Node, name: string): boolean;
|
3
|
-
export declare function getRoute(name: string): string;
|
4
|
-
export declare function findRoutesInSource(source: SourceFile): Node | undefined;
|
1
|
+
import { Node, SourceFile } from 'typescript';
|
2
|
+
export declare function hasComponentInRoutes(routes: Node, name: string): boolean;
|
3
|
+
export declare function getRoute(name: string): string;
|
4
|
+
export declare function findRoutesInSource(source: SourceFile): Node | undefined;
|
package/src/utility/routing.js
CHANGED
@@ -1,36 +1,37 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
const
|
5
|
-
|
6
|
-
|
7
|
-
}
|
8
|
-
|
9
|
-
|
10
|
-
const
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.findRoutesInSource = exports.getRoute = exports.hasComponentInRoutes = void 0;
|
4
|
+
const typescript_1 = require("typescript");
|
5
|
+
const core_1 = require("@angular-devkit/core");
|
6
|
+
function getRouteComponentName(pageName) {
|
7
|
+
return `${core_1.strings.classify(core_1.basename(core_1.normalize(pageName)))}Component`;
|
8
|
+
}
|
9
|
+
function hasComponentInRoutes(routes, name) {
|
10
|
+
const routesText = routes.getText();
|
11
|
+
const componentName = getRouteComponentName(name);
|
12
|
+
return routesText.indexOf(componentName) !== -1;
|
13
|
+
}
|
14
|
+
exports.hasComponentInRoutes = hasComponentInRoutes;
|
15
|
+
function getRoute(name) {
|
15
16
|
return ` {
|
16
17
|
path: '${core_1.strings.dasherize(name)}',
|
17
18
|
component: ${getRouteComponentName(name)},
|
18
19
|
canActivate: [ AuthGuardService ]
|
19
|
-
}`;
|
20
|
-
}
|
21
|
-
exports.getRoute = getRoute;
|
22
|
-
function isRouteVariable(node, text) {
|
23
|
-
return node.kind === typescript_1.SyntaxKind.VariableStatement &&
|
24
|
-
text.search(/\:\s*Routes/) !== -1;
|
25
|
-
}
|
26
|
-
function findRoutesInSource(source) {
|
27
|
-
// TODO: try to use ast-utils/findNodes
|
28
|
-
return source.forEachChild((node) => {
|
29
|
-
const text = node.getText();
|
30
|
-
if (isRouteVariable(node, text)) {
|
31
|
-
return node;
|
32
|
-
}
|
33
|
-
});
|
34
|
-
}
|
35
|
-
exports.findRoutesInSource = findRoutesInSource;
|
20
|
+
}`;
|
21
|
+
}
|
22
|
+
exports.getRoute = getRoute;
|
23
|
+
function isRouteVariable(node, text) {
|
24
|
+
return node.kind === typescript_1.SyntaxKind.VariableStatement &&
|
25
|
+
text.search(/\:\s*Routes/) !== -1;
|
26
|
+
}
|
27
|
+
function findRoutesInSource(source) {
|
28
|
+
// TODO: try to use ast-utils/findNodes
|
29
|
+
return source.forEachChild((node) => {
|
30
|
+
const text = node.getText();
|
31
|
+
if (isRouteVariable(node, text)) {
|
32
|
+
return node;
|
33
|
+
}
|
34
|
+
});
|
35
|
+
}
|
36
|
+
exports.findRoutesInSource = findRoutesInSource;
|
36
37
|
//# sourceMappingURL=routing.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["routing.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["routing.ts"],"names":[],"mappings":";;;AAAA,2CAIoB;AAEpB,+CAI8B;AAE9B,SAAS,qBAAqB,CAAC,QAAgB;IAC7C,OAAO,GAAG,cAAO,CAAC,QAAQ,CAAC,eAAQ,CAAC,gBAAS,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC;AACvE,CAAC;AAED,SAAgB,oBAAoB,CAAC,MAAY,EAAE,IAAY;IAC7D,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IACpC,MAAM,aAAa,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO,UAAU,CAAC,OAAO,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AAClD,CAAC;AAJD,oDAIC;AAED,SAAgB,QAAQ,CAAC,IAAY;IACnC,OAAO;aACI,cAAO,CAAC,SAAS,CAAC,IAAI,CAAC;iBACnB,qBAAqB,CAAC,IAAI,CAAC;;IAExC,CAAC;AACL,CAAC;AAND,4BAMC;AAED,SAAS,eAAe,CAAC,IAAU,EAAE,IAAY;IAC7C,OAAO,IAAI,CAAC,IAAI,KAAK,uBAAU,CAAC,iBAAiB;QAC/C,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC;AACtC,CAAC;AAEH,SAAgB,kBAAkB,CAAC,MAAkB;IACnD,uCAAuC;IACvC,OAAO,MAAM,CAAC,YAAY,CAAC,CAAC,IAAI,EAAE,EAAE;QAClC,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,EAAE,CAAC;QAC5B,IAAI,eAAe,CAAC,IAAI,EAAE,IAAI,CAAC,EAAE;YAC/B,OAAO,IAAI,CAAC;SACb;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AARD,gDAQC"}
|
package/src/utility/source.d.ts
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
import { SourceFile } from 'typescript';
|
3
|
-
export declare function getSourceFile(host: Tree, filePath: string): SourceFile | undefined;
|
1
|
+
import { Tree } from '@angular-devkit/schematics';
|
2
|
+
import { SourceFile } from 'typescript';
|
3
|
+
export declare function getSourceFile(host: Tree, filePath: string): SourceFile | undefined;
|
package/src/utility/source.js
CHANGED
@@ -1,13 +1,14 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getSourceFile = void 0;
|
4
|
+
const typescript_1 = require("typescript");
|
5
|
+
function getSourceFile(host, filePath) {
|
6
|
+
const buffer = host.read(filePath);
|
7
|
+
if (!buffer) {
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
const serializedFile = host.read(filePath).toString();
|
11
|
+
return typescript_1.createSourceFile(filePath, serializedFile, typescript_1.ScriptTarget.Latest, true);
|
12
|
+
}
|
13
|
+
exports.getSourceFile = getSourceFile;
|
13
14
|
//# sourceMappingURL=source.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["source.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["source.ts"],"names":[],"mappings":";;;AACA,2CAIoB;AAEpB,SAAgB,aAAa,CAAC,IAAU,EAAE,QAAgB;IACxD,MAAM,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAEnC,IAAI,CAAC,MAAM,EAAE;QACX,OAAO;KACR;IACD,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAE,CAAC,QAAQ,EAAE,CAAC;IACvD,OAAO,6BAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,yBAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;AAC/E,CAAC;AARD,sCAQC"}
|
package/src/utility/string.d.ts
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export declare function humanize(str: string): string;
|
1
|
+
export declare function humanize(str: string): string;
|
package/src/utility/string.js
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.humanize = void 0;
|
4
|
+
const core_1 = require("@angular-devkit/core");
|
5
|
+
function humanize(str) {
|
6
|
+
return str.split('-').map((part) => core_1.strings.capitalize(part)).join(' ');
|
7
|
+
}
|
8
|
+
exports.humanize = humanize;
|
8
9
|
//# sourceMappingURL=string.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"string.js","sourceRoot":"","sources":["string.ts"],"names":[],"mappings":";;;AAAA,+CAA+C;AAE/C,SAAgB,QAAQ,CAAC,GAAW;IAClC,OAAO,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,cAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClF,CAAC;AAFD,4BAEC"}
|
package/src/utility/styles.d.ts
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
export declare function addStylesToApp(host: Tree, project: string, config: any, styles?: Array<any>): any;
|
1
|
+
export declare function addStylesToApp(project: string, config: any, styles?: Array<any>): any;
|
package/src/utility/styles.js
CHANGED
@@ -1,31 +1,30 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
|
4
|
-
const array_1 = require("./array");
|
5
|
-
function cleanStyles(projectStyles, defaultStyles) {
|
6
|
-
return projectStyles.filter((style) => {
|
7
|
-
return style !== defaultStyles[0] && style !== defaultStyles[1];
|
8
|
-
});
|
9
|
-
}
|
10
|
-
function addStylesToApp(
|
11
|
-
const
|
12
|
-
const
|
13
|
-
|
14
|
-
'node_modules/devextreme/dist/css/dx.
|
15
|
-
|
16
|
-
];
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
exports.addStylesToApp = addStylesToApp;
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.addStylesToApp = void 0;
|
4
|
+
const array_1 = require("./array");
|
5
|
+
function cleanStyles(projectStyles, defaultStyles) {
|
6
|
+
return projectStyles.filter((style) => {
|
7
|
+
return style !== defaultStyles[0] && style !== defaultStyles[1];
|
8
|
+
});
|
9
|
+
}
|
10
|
+
function addStylesToApp(project, config, styles) {
|
11
|
+
const projectBuildOptopns = config['projects'][project]['architect']['build']['options'];
|
12
|
+
const defaultStyles = [
|
13
|
+
'node_modules/devextreme/dist/css/dx.light.css',
|
14
|
+
'node_modules/devextreme/dist/css/dx.common.css'
|
15
|
+
];
|
16
|
+
let projectStyles = projectBuildOptopns['styles'];
|
17
|
+
if (!styles) {
|
18
|
+
styles = defaultStyles;
|
19
|
+
}
|
20
|
+
else {
|
21
|
+
projectStyles = cleanStyles(projectStyles, defaultStyles);
|
22
|
+
}
|
23
|
+
styles.forEach((style) => {
|
24
|
+
projectStyles.unshift(style);
|
25
|
+
});
|
26
|
+
projectBuildOptopns['styles'] = array_1.makeArrayUnique(projectStyles);
|
27
|
+
return config;
|
28
|
+
}
|
29
|
+
exports.addStylesToApp = addStylesToApp;
|
31
30
|
//# sourceMappingURL=styles.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"styles.js","sourceRoot":"","sources":["styles.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"styles.js","sourceRoot":"","sources":["styles.ts"],"names":[],"mappings":";;;AAAA,mCAA0C;AAE1C,SAAS,WAAW,CAAC,aAAyB,EAAE,aAAkB;IAChE,OAAO,aAAa,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE;QACpC,OAAO,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,aAAa,CAAC,CAAC,CAAC,CAAC;IAClE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAgB,cAAc,CAAC,OAAe,EAAE,MAAW,EAAE,MAAmB;IAC9E,MAAM,mBAAmB,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,WAAW,CAAC,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC,CAAC;IACzF,MAAM,aAAa,GAAG;QACpB,+CAA+C;QAC/C,gDAAgD;KACjD,CAAC;IACF,IAAI,aAAa,GAAG,mBAAmB,CAAC,QAAQ,CAAC,CAAC;IAElD,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,GAAG,aAAa,CAAC;KACxB;SAAM;QACL,aAAa,GAAG,WAAW,CAAC,aAAa,EAAE,aAAa,CAAC,CAAC;KAC3D;IAED,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE;QACvB,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC,CAAC,CAAC;IAEH,mBAAmB,CAAC,QAAQ,CAAC,GAAG,uBAAe,CAAC,aAAa,CAAC,CAAC;IAE/D,OAAO,MAAM,CAAC;AAChB,CAAC;AArBD,wCAqBC"}
|
package/src/utility/styles.ts
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
import { Tree } from '@angular-devkit/schematics';
|
2
|
-
import { getProjectName } from './project';
|
3
1
|
import { makeArrayUnique } from './array';
|
4
2
|
|
5
3
|
function cleanStyles(projectStyles: Array<any>, defaultStyles: any) {
|
@@ -8,9 +6,8 @@ function cleanStyles(projectStyles: Array<any>, defaultStyles: any) {
|
|
8
6
|
});
|
9
7
|
}
|
10
8
|
|
11
|
-
export function addStylesToApp(
|
12
|
-
const
|
13
|
-
const projectBuildOptopns = config['projects'][projectName]['architect']['build']['options'];
|
9
|
+
export function addStylesToApp(project: string, config: any, styles?: Array<any>) {
|
10
|
+
const projectBuildOptopns = config['projects'][project]['architect']['build']['options'];
|
14
11
|
const defaultStyles = [
|
15
12
|
'node_modules/devextreme/dist/css/dx.light.css',
|
16
13
|
'node_modules/devextreme/dist/css/dx.common.css'
|