devextreme-schematics 1.2.23 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- 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
package/src/add-view/index.js
CHANGED
@@ -1,125 +1,137 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
const
|
24
|
-
|
25
|
-
return;
|
26
|
-
}
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
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.addViewToRouting = void 0;
|
13
|
+
const schematics_1 = require("@angular-devkit/schematics");
|
14
|
+
const find_module_1 = require("@schematics/angular/utility/find-module");
|
15
|
+
const change_1 = require("../utility/change");
|
16
|
+
const routing_1 = require("../utility/routing");
|
17
|
+
const source_1 = require("../utility/source");
|
18
|
+
const core_1 = require("@angular-devkit/core");
|
19
|
+
const project_1 = require("../utility/project");
|
20
|
+
const string_1 = require("../utility/string");
|
21
|
+
function getPathToFile(host, projectName, moduleName) {
|
22
|
+
return __awaiter(this, void 0, void 0, function* () {
|
23
|
+
const rootPath = yield project_1.getApplicationPath(host, projectName);
|
24
|
+
try {
|
25
|
+
return find_module_1.findModuleFromOptions(host, { name: moduleName, path: rootPath, module: moduleName });
|
26
|
+
}
|
27
|
+
catch (error) {
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
});
|
31
|
+
}
|
32
|
+
function addViewToNavigation(options) {
|
33
|
+
return (host) => __awaiter(this, void 0, void 0, function* () {
|
34
|
+
const navigationName = 'app-navigation';
|
35
|
+
const navigationFilePath = yield getPathToFile(host, options.project, navigationName);
|
36
|
+
if (!navigationFilePath) {
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
const source = source_1.getSourceFile(host, navigationFilePath);
|
40
|
+
const pagePath = core_1.strings.dasherize(options.name);
|
41
|
+
const name = core_1.strings.dasherize(core_1.basename(core_1.normalize(options.name)));
|
42
|
+
const title = string_1.humanize(name);
|
31
43
|
const navigationItem = ` {
|
32
44
|
text: '${title}',
|
33
45
|
path: '/${pagePath}',
|
34
46
|
icon: '${options.icon}'
|
35
|
-
}`;
|
36
|
-
change_1.insertItemToArray(host, navigationFilePath, source, navigationItem, { location: 'end' });
|
37
|
-
return host;
|
38
|
-
};
|
39
|
-
}
|
40
|
-
function addRedirectRoute(host, routingModulePath, page) {
|
41
|
-
const source = source_1.getSourceFile(host, routingModulePath);
|
42
|
-
const content = source.getText();
|
43
|
-
if (content.match(/path:\s*'\*\*'/g)) {
|
44
|
-
return;
|
45
|
-
}
|
46
|
-
const routes = routing_1.findRoutesInSource(source);
|
47
|
+
}`;
|
48
|
+
change_1.insertItemToArray(host, navigationFilePath, source, navigationItem, { location: 'end' });
|
49
|
+
return host;
|
50
|
+
});
|
51
|
+
}
|
52
|
+
function addRedirectRoute(host, routingModulePath, page) {
|
53
|
+
const source = source_1.getSourceFile(host, routingModulePath);
|
54
|
+
const content = source.getText();
|
55
|
+
if (content.match(/path:\s*'\*\*'/g)) {
|
56
|
+
return;
|
57
|
+
}
|
58
|
+
const routes = routing_1.findRoutesInSource(source);
|
47
59
|
const redirectRoute = ` {
|
48
60
|
path: '**',
|
49
61
|
redirectTo: '${core_1.strings.dasherize(page)}'
|
50
|
-
}`;
|
51
|
-
change_1.insertItemToArray(host, routingModulePath, routes, redirectRoute, { location: 'end' });
|
52
|
-
}
|
53
|
-
function addViewToRouting(options) {
|
54
|
-
return (host) => {
|
55
|
-
const routingModulePath = getPathToFile(host, options.project, options.module);
|
56
|
-
if (!routingModulePath) {
|
57
|
-
throw new schematics_1.SchematicsException('Specified module does not exist.');
|
58
|
-
}
|
59
|
-
addRedirectRoute(host, routingModulePath, options.name);
|
60
|
-
const source = source_1.getSourceFile(host, routingModulePath);
|
61
|
-
const routes = routing_1.findRoutesInSource(source);
|
62
|
-
if (!routes) {
|
63
|
-
throw new schematics_1.SchematicsException('No routes found.');
|
64
|
-
}
|
65
|
-
if (!routing_1.hasComponentInRoutes(routes, options.name)) {
|
66
|
-
const route = routing_1.getRoute(options.name);
|
67
|
-
change_1.insertItemToArray(host, routingModulePath, routes, route);
|
68
|
-
}
|
69
|
-
return host;
|
70
|
-
};
|
71
|
-
}
|
72
|
-
exports.addViewToRouting = addViewToRouting;
|
73
|
-
function getPathForView(name) {
|
74
|
-
if (name.includes('/')) {
|
75
|
-
return name;
|
76
|
-
}
|
77
|
-
return 'pages/' + name;
|
78
|
-
}
|
79
|
-
function getModuleName(addRoute, moduleName) {
|
80
|
-
if (!moduleName && addRoute) {
|
81
|
-
return 'app-routing';
|
82
|
-
}
|
83
|
-
return moduleName;
|
84
|
-
}
|
85
|
-
function addContentToView(options) {
|
86
|
-
return (host) => {
|
87
|
-
const name = core_1.strings.dasherize(core_1.basename(core_1.normalize(options.name)));
|
88
|
-
const path = `${core_1.dirname(options.name)}/${name}`;
|
89
|
-
const title = string_1.humanize(name);
|
90
|
-
const componentPath = `/${project_1.getApplicationPath(host, options.project)}${path}/${name}.component.html`;
|
91
|
-
if (host.exists(componentPath)) {
|
62
|
+
}`;
|
63
|
+
change_1.insertItemToArray(host, routingModulePath, routes, redirectRoute, { location: 'end' });
|
64
|
+
}
|
65
|
+
function addViewToRouting(options) {
|
66
|
+
return (host) => __awaiter(this, void 0, void 0, function* () {
|
67
|
+
const routingModulePath = yield getPathToFile(host, options.project, options.module);
|
68
|
+
if (!routingModulePath) {
|
69
|
+
throw new schematics_1.SchematicsException('Specified module does not exist.');
|
70
|
+
}
|
71
|
+
addRedirectRoute(host, routingModulePath, options.name);
|
72
|
+
const source = source_1.getSourceFile(host, routingModulePath);
|
73
|
+
const routes = routing_1.findRoutesInSource(source);
|
74
|
+
if (!routes) {
|
75
|
+
throw new schematics_1.SchematicsException('No routes found.');
|
76
|
+
}
|
77
|
+
if (!routing_1.hasComponentInRoutes(routes, options.name)) {
|
78
|
+
const route = routing_1.getRoute(options.name);
|
79
|
+
change_1.insertItemToArray(host, routingModulePath, routes, route);
|
80
|
+
}
|
81
|
+
return host;
|
82
|
+
});
|
83
|
+
}
|
84
|
+
exports.addViewToRouting = addViewToRouting;
|
85
|
+
function getPathForView(name) {
|
86
|
+
if (name.includes('/')) {
|
87
|
+
return name;
|
88
|
+
}
|
89
|
+
return 'pages/' + name;
|
90
|
+
}
|
91
|
+
function getModuleName(addRoute, moduleName) {
|
92
|
+
if (!moduleName && addRoute) {
|
93
|
+
return 'app-routing';
|
94
|
+
}
|
95
|
+
return moduleName;
|
96
|
+
}
|
97
|
+
function addContentToView(options) {
|
98
|
+
return (host) => __awaiter(this, void 0, void 0, function* () {
|
99
|
+
const name = core_1.strings.dasherize(core_1.basename(core_1.normalize(options.name)));
|
100
|
+
const path = `${core_1.dirname(options.name)}/${name}`;
|
101
|
+
const title = string_1.humanize(name);
|
102
|
+
const componentPath = `/${yield project_1.getApplicationPath(host, options.project)}${path}/${name}.component.html`;
|
103
|
+
if (host.exists(componentPath)) {
|
92
104
|
host.overwrite(componentPath, `<h2 class="content-block">${title}</h2>
|
93
105
|
<div class="content-block">
|
94
106
|
<div class="dx-card responsive-paddings">Put your content here</div>
|
95
107
|
</div>
|
96
|
-
`);
|
97
|
-
}
|
98
|
-
return host;
|
99
|
-
};
|
100
|
-
}
|
101
|
-
function default_1(options) {
|
102
|
-
return (host) => {
|
103
|
-
const addRoute = options.addRoute;
|
104
|
-
const project = project_1.getProjectName(host, options);
|
105
|
-
const module = getModuleName(addRoute, options.module);
|
106
|
-
const name = getPathForView(options.name);
|
107
|
-
const rules = [schematics_1.externalSchematic('@schematics/angular', 'component', {
|
108
|
-
name,
|
109
|
-
project,
|
110
|
-
module,
|
111
|
-
skipTests: options.skipTests,
|
112
|
-
inlineStyle: options.inlineStyle,
|
113
|
-
prefix: options.prefix
|
114
|
-
}),
|
115
|
-
addContentToView({ name, project })
|
116
|
-
];
|
117
|
-
if (addRoute) {
|
118
|
-
rules.push(addViewToRouting({ name, project, module }));
|
119
|
-
rules.push(addViewToNavigation({ name, icon: options.icon, project }));
|
120
|
-
}
|
121
|
-
return schematics_1.chain(rules);
|
122
|
-
};
|
123
|
-
}
|
124
|
-
exports.default = default_1;
|
108
|
+
`);
|
109
|
+
}
|
110
|
+
return host;
|
111
|
+
});
|
112
|
+
}
|
113
|
+
function default_1(options) {
|
114
|
+
return (host) => __awaiter(this, void 0, void 0, function* () {
|
115
|
+
const addRoute = options.addRoute;
|
116
|
+
const project = yield project_1.getProjectName(host, options);
|
117
|
+
const module = getModuleName(addRoute, options.module);
|
118
|
+
const name = getPathForView(options.name);
|
119
|
+
const rules = [schematics_1.externalSchematic('@schematics/angular', 'component', {
|
120
|
+
name,
|
121
|
+
project,
|
122
|
+
module,
|
123
|
+
skipTests: options.skipTests,
|
124
|
+
inlineStyle: options.inlineStyle,
|
125
|
+
prefix: options.prefix
|
126
|
+
}),
|
127
|
+
addContentToView({ name, project })
|
128
|
+
];
|
129
|
+
if (addRoute) {
|
130
|
+
rules.push(addViewToRouting({ name, project, module }));
|
131
|
+
rules.push(addViewToNavigation({ name, icon: options.icon, project }));
|
132
|
+
}
|
133
|
+
return schematics_1.chain(rules);
|
134
|
+
});
|
135
|
+
}
|
136
|
+
exports.default = default_1;
|
125
137
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2DAMoC;AAEpC,yEAEiD;AAEjD,8CAE2B;AAE3B,gDAI4B;AAE5B,8CAAkD;AAElD,+CAA6E;AAE7E,gDAG4B;AAC5B,8CAA6C;AAE7C,SAAe,aAAa,CAAC,IAAU,EAAE,WAAmB,EAAE,UAAkB;;QAC9E,MAAM,QAAQ,GAAG,MAAM,4BAAkB,CAAC,IAAI,EAAE,WAAW,CAAC,CAAC;QAE7D,IAAI;YACF,OAAO,mCAAqB,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ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;gBACjE,IAAI;gBACJ,OAAO;gBACP,MAAM;gBACN,SAAS,EAAE,OAAO,CAAC,SAAS;gBAC5B,WAAW,EAAE,OAAO,CAAC,WAAW;gBAChC,MAAM,EAAE,OAAO,CAAC,MAAM;aACvB,CAAC;YACF,gBAAgB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAQ;SAC3C,CAAC;QAEF,IAAI,QAAQ,EAAE;YACZ,KAAK,CAAC,IAAI,CAAC,gBAAgB,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,EAAE,CAAQ,CAAC,CAAC;YAC/D,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,CAAC,IAAI,EAAE,OAAO,EAAE,CAAQ,CAAC,CAAC;SAC/E;QACD,OAAO,kBAAK,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC,CAAA,CAAC;AACJ,CAAC;AAxBD,4BAwBC"}
|
package/src/add-view/index.ts
CHANGED
@@ -30,8 +30,8 @@ import {
|
|
30
30
|
} from '../utility/project';
|
31
31
|
import { humanize } from '../utility/string';
|
32
32
|
|
33
|
-
function getPathToFile(host: Tree, projectName: string, moduleName: string) {
|
34
|
-
const rootPath = getApplicationPath(host, projectName);
|
33
|
+
async function getPathToFile(host: Tree, projectName: string, moduleName: string) {
|
34
|
+
const rootPath = await getApplicationPath(host, projectName);
|
35
35
|
|
36
36
|
try {
|
37
37
|
return findModuleFromOptions(host, { name: moduleName, path: rootPath, module: moduleName });
|
@@ -41,9 +41,9 @@ function getPathToFile(host: Tree, projectName: string, moduleName: string) {
|
|
41
41
|
}
|
42
42
|
|
43
43
|
function addViewToNavigation(options: any) {
|
44
|
-
return (host: Tree) => {
|
44
|
+
return async (host: Tree) => {
|
45
45
|
const navigationName = 'app-navigation';
|
46
|
-
const navigationFilePath = getPathToFile(host, options.project, navigationName);
|
46
|
+
const navigationFilePath = await getPathToFile(host, options.project, navigationName);
|
47
47
|
|
48
48
|
if (!navigationFilePath) {
|
49
49
|
return;
|
@@ -82,8 +82,8 @@ function addRedirectRoute(host: Tree, routingModulePath: string, page: string) {
|
|
82
82
|
}
|
83
83
|
|
84
84
|
export function addViewToRouting(options: any) {
|
85
|
-
return (host: Tree) => {
|
86
|
-
const routingModulePath = getPathToFile(host, options.project, options.module);
|
85
|
+
return async (host: Tree) => {
|
86
|
+
const routingModulePath = await getPathToFile(host, options.project, options.module);
|
87
87
|
|
88
88
|
if (!routingModulePath) {
|
89
89
|
throw new SchematicsException('Specified module does not exist.');
|
@@ -121,11 +121,11 @@ function getModuleName(addRoute: boolean, moduleName: string) {
|
|
121
121
|
}
|
122
122
|
|
123
123
|
function addContentToView(options: any) {
|
124
|
-
return (host: Tree) => {
|
124
|
+
return async (host: Tree) => {
|
125
125
|
const name = strings.dasherize(basename(normalize(options.name)));
|
126
126
|
const path = `${dirname(options.name)}/${name}`;
|
127
127
|
const title = humanize(name);
|
128
|
-
const componentPath = `/${getApplicationPath(host, options.project)}${path}/${name}.component.html`;
|
128
|
+
const componentPath = `/${await getApplicationPath(host, options.project)}${path}/${name}.component.html`;
|
129
129
|
if (host.exists(componentPath)) {
|
130
130
|
host.overwrite(
|
131
131
|
componentPath,
|
@@ -140,11 +140,12 @@ function addContentToView(options: any) {
|
|
140
140
|
}
|
141
141
|
|
142
142
|
export default function(options: any): Rule {
|
143
|
-
return (host: Tree) => {
|
143
|
+
return async (host: Tree) => {
|
144
144
|
const addRoute = options.addRoute;
|
145
|
-
const project = getProjectName(host, options);
|
145
|
+
const project = await getProjectName(host, options);
|
146
146
|
const module = getModuleName(addRoute, options.module);
|
147
147
|
const name = getPathForView(options.name);
|
148
|
+
|
148
149
|
const rules = [externalSchematic('@schematics/angular', 'component', {
|
149
150
|
name,
|
150
151
|
project,
|
@@ -153,12 +154,12 @@ export default function(options: any): Rule {
|
|
153
154
|
inlineStyle: options.inlineStyle,
|
154
155
|
prefix: options.prefix
|
155
156
|
}),
|
156
|
-
addContentToView({ name, project })
|
157
|
+
addContentToView({ name, project }) as any
|
157
158
|
];
|
158
159
|
|
159
160
|
if (addRoute) {
|
160
|
-
rules.push(addViewToRouting({ name, project, module }));
|
161
|
-
rules.push(addViewToNavigation({ name, icon: options.icon, project }));
|
161
|
+
rules.push(addViewToRouting({ name, project, module }) as any);
|
162
|
+
rules.push(addViewToNavigation({ name, icon: options.icon, project }) as any);
|
162
163
|
}
|
163
164
|
return chain(rules);
|
164
165
|
};
|
@@ -1 +1 @@
|
|
1
|
-
export {};
|
1
|
+
export {};
|
@@ -1,65 +1,66 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
return
|
4
|
-
|
5
|
-
function
|
6
|
-
function
|
7
|
-
step(
|
8
|
-
|
9
|
-
};
|
10
|
-
|
11
|
-
|
12
|
-
const
|
13
|
-
const
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
const
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
appTree = yield schematicRunner.runSchematicAsync('
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
tree = yield runner.runSchematicAsync('add-
|
51
|
-
|
52
|
-
expect(tree.files).toContain('/src/app/pages/test/test.component.
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
const
|
59
|
-
|
60
|
-
tree = yield runner.runSchematicAsync('add-
|
61
|
-
tree = yield runner.runSchematicAsync('add-view',
|
62
|
-
|
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 testing_1 = require("@angular-devkit/schematics/testing");
|
13
|
+
const path = require("path");
|
14
|
+
const collectionPath = path.join(__dirname, '../collection.json');
|
15
|
+
describe('view', () => {
|
16
|
+
const appOptions = {
|
17
|
+
name: 'testApp',
|
18
|
+
projectRoot: '',
|
19
|
+
inlineStyle: false,
|
20
|
+
inlineTemplate: false,
|
21
|
+
routing: true,
|
22
|
+
style: 'css',
|
23
|
+
skipTests: false,
|
24
|
+
skipPackageJson: false
|
25
|
+
};
|
26
|
+
const workspaceOptions = {
|
27
|
+
name: 'workspace',
|
28
|
+
version: '6.0.0'
|
29
|
+
};
|
30
|
+
const componentOptions = {
|
31
|
+
name: 'test',
|
32
|
+
inlineStyle: false,
|
33
|
+
inlineTemplate: false,
|
34
|
+
changeDetection: 'Default',
|
35
|
+
styleext: 'css',
|
36
|
+
skipImport: true,
|
37
|
+
module: undefined,
|
38
|
+
export: false,
|
39
|
+
project: 'testApp'
|
40
|
+
};
|
41
|
+
const angularSchematicsCollection = require.resolve('../../node_modules/@schematics/angular/collection.json');
|
42
|
+
const schematicRunner = new testing_1.SchematicTestRunner('@schematics/angular', angularSchematicsCollection);
|
43
|
+
let appTree;
|
44
|
+
beforeEach(() => __awaiter(void 0, void 0, void 0, function* () {
|
45
|
+
appTree = yield schematicRunner.runSchematicAsync('workspace', workspaceOptions).toPromise();
|
46
|
+
appTree = yield schematicRunner.runSchematicAsync('application', appOptions, appTree).toPromise();
|
47
|
+
}));
|
48
|
+
it('should create new view', () => __awaiter(void 0, void 0, void 0, function* () {
|
49
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
50
|
+
let tree = yield runner.runSchematicAsync('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree).toPromise();
|
51
|
+
tree = yield runner.runSchematicAsync('add-view', componentOptions, appTree).toPromise();
|
52
|
+
expect(tree.files).toContain('/src/app/pages/test/test.component.ts');
|
53
|
+
expect(tree.files).toContain('/src/app/pages/test/test.component.html');
|
54
|
+
const content = tree.readContent('/src/app/pages/test/test.component.html');
|
55
|
+
expect(content).toMatch(/<h2 class="content-block">Test<\/h2>/);
|
56
|
+
}));
|
57
|
+
it('should add view to default routing module', () => __awaiter(void 0, void 0, void 0, function* () {
|
58
|
+
const options = Object.assign(Object.assign({}, componentOptions), { addRoute: true });
|
59
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
60
|
+
let tree = yield runner.runSchematicAsync('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree).toPromise();
|
61
|
+
tree = yield runner.runSchematicAsync('add-view', options, tree).toPromise();
|
62
|
+
tree = yield runner.runSchematicAsync('add-view', Object.assign(Object.assign({}, options), { name: 'test2' }), tree).toPromise();
|
63
|
+
const moduleContent = tree.readContent('/src/app/app-routing.module.ts');
|
63
64
|
expect(moduleContent).toContain(`const routes: Routes = [
|
64
65
|
{
|
65
66
|
path: 'pages/test2',
|
@@ -80,39 +81,39 @@ describe('view', () => {
|
|
80
81
|
path: '**',
|
81
82
|
redirectTo: 'pages/test'
|
82
83
|
}
|
83
|
-
];`);
|
84
|
-
}));
|
85
|
-
it('should add view to other routing module', () => __awaiter(
|
86
|
-
const options = Object.assign({}, componentOptions, { addRoute: true, module: 'test/test-routing' });
|
87
|
-
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
88
|
-
let tree = yield runner.runExternalSchematicAsync('@schematics/angular', 'module', {
|
89
|
-
name: 'test',
|
90
|
-
routing: true,
|
91
|
-
project: 'testApp'
|
92
|
-
}, appTree).toPromise();
|
93
|
-
tree = yield runner.runSchematicAsync('add-layout', {
|
94
|
-
layout: 'side-nav-outer-toolbar',
|
95
|
-
project: 'testApp',
|
96
|
-
name: 'test'
|
97
|
-
}, tree).toPromise();
|
98
|
-
tree = yield runner.runSchematicAsync('add-view', options, tree).toPromise();
|
99
|
-
const moduleContent = tree.readContent('/src/app/test/test-routing.module.ts');
|
100
|
-
expect(moduleContent).toMatch(/component: TestComponent/);
|
101
|
-
expect(moduleContent).toMatch(/path: 'pages\/test'/);
|
102
|
-
expect(moduleContent).toContain('canActivate: [ AuthGuardService ]');
|
103
|
-
}));
|
104
|
-
it('should add view to navigation', () => __awaiter(
|
105
|
-
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
106
|
-
let tree = yield runner.runSchematicAsync('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree).toPromise();
|
107
|
-
tree = yield runner.runSchematicAsync('add-view', componentOptions, tree).toPromise();
|
108
|
-
componentOptions.name = 'some test';
|
109
|
-
componentOptions.icon = 'home';
|
110
|
-
tree = yield runner.runSchematicAsync('add-view', componentOptions, tree).toPromise();
|
111
|
-
const moduleContent = tree.readContent('/src/app/app-navigation.ts');
|
112
|
-
expect(moduleContent).toMatch(/text: 'Some Test'/);
|
113
|
-
expect(moduleContent).toMatch(/icon: 'home'/);
|
114
|
-
expect(moduleContent).toMatch(/text: 'Test'/);
|
115
|
-
expect(moduleContent).toMatch(/icon: 'folder'/);
|
84
|
+
];`);
|
85
|
+
}));
|
86
|
+
it('should add view to other routing module', () => __awaiter(void 0, void 0, void 0, function* () {
|
87
|
+
const options = Object.assign(Object.assign({}, componentOptions), { addRoute: true, module: 'test/test-routing' });
|
88
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
89
|
+
let tree = yield runner.runExternalSchematicAsync('@schematics/angular', 'module', {
|
90
|
+
name: 'test',
|
91
|
+
routing: true,
|
92
|
+
project: 'testApp'
|
93
|
+
}, appTree).toPromise();
|
94
|
+
tree = yield runner.runSchematicAsync('add-layout', {
|
95
|
+
layout: 'side-nav-outer-toolbar',
|
96
|
+
project: 'testApp',
|
97
|
+
name: 'test'
|
98
|
+
}, tree).toPromise();
|
99
|
+
tree = yield runner.runSchematicAsync('add-view', options, tree).toPromise();
|
100
|
+
const moduleContent = tree.readContent('/src/app/test/test-routing.module.ts');
|
101
|
+
expect(moduleContent).toMatch(/component: TestComponent/);
|
102
|
+
expect(moduleContent).toMatch(/path: 'pages\/test'/);
|
103
|
+
expect(moduleContent).toContain('canActivate: [ AuthGuardService ]');
|
104
|
+
}));
|
105
|
+
it('should add view to navigation', () => __awaiter(void 0, void 0, void 0, function* () {
|
106
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
107
|
+
let tree = yield runner.runSchematicAsync('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree).toPromise();
|
108
|
+
tree = yield runner.runSchematicAsync('add-view', componentOptions, tree).toPromise();
|
109
|
+
componentOptions.name = 'some test';
|
110
|
+
componentOptions.icon = 'home';
|
111
|
+
tree = yield runner.runSchematicAsync('add-view', componentOptions, tree).toPromise();
|
112
|
+
const moduleContent = tree.readContent('/src/app/app-navigation.ts');
|
113
|
+
expect(moduleContent).toMatch(/text: 'Some Test'/);
|
114
|
+
expect(moduleContent).toMatch(/icon: 'home'/);
|
115
|
+
expect(moduleContent).toMatch(/text: 'Test'/);
|
116
|
+
expect(moduleContent).toMatch(/icon: 'folder'/);
|
116
117
|
expect(moduleContent).toContain(`navigation = [
|
117
118
|
{
|
118
119
|
text: 'Test',
|
@@ -124,17 +125,17 @@ describe('view', () => {
|
|
124
125
|
path: '/pages/some-test',
|
125
126
|
icon: 'home'
|
126
127
|
}
|
127
|
-
];`);
|
128
|
-
const pageContent = tree.readContent('/src/app/pages/some-test/some-test.component.html');
|
129
|
-
expect(pageContent).toMatch(/<h2 class="content-block">Some Test<\/h2>/);
|
130
|
-
}));
|
131
|
-
it('should create new view with path', () => __awaiter(
|
132
|
-
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
133
|
-
componentOptions.name = 'folder/test';
|
134
|
-
let tree = yield runner.runSchematicAsync('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree).toPromise();
|
135
|
-
tree = yield runner.runSchematicAsync('add-view', componentOptions, appTree).toPromise();
|
136
|
-
expect(tree.files).toContain('/src/app/folder/test/test.component.ts');
|
137
|
-
expect(tree.files).toContain('/src/app/folder/test/test.component.html');
|
138
|
-
}));
|
139
|
-
});
|
128
|
+
];`);
|
129
|
+
const pageContent = tree.readContent('/src/app/pages/some-test/some-test.component.html');
|
130
|
+
expect(pageContent).toMatch(/<h2 class="content-block">Some Test<\/h2>/);
|
131
|
+
}));
|
132
|
+
it('should create new view with path', () => __awaiter(void 0, void 0, void 0, function* () {
|
133
|
+
const runner = new testing_1.SchematicTestRunner('schematics', collectionPath);
|
134
|
+
componentOptions.name = 'folder/test';
|
135
|
+
let tree = yield runner.runSchematicAsync('add-layout', { layout: 'side-nav-outer-toolbar' }, appTree).toPromise();
|
136
|
+
tree = yield runner.runSchematicAsync('add-view', componentOptions, appTree).toPromise();
|
137
|
+
expect(tree.files).toContain('/src/app/folder/test/test.component.ts');
|
138
|
+
expect(tree.files).toContain('/src/app/folder/test/test.component.html');
|
139
|
+
}));
|
140
|
+
});
|
140
141
|
//# sourceMappingURL=index_spec.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index_spec.js","sourceRoot":"","sources":["index_spec.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gEAAuF;AAEvF,6BAA6B;AAE7B,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;AAElE,QAAQ,CAAC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