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-layout/index.js
CHANGED
@@ -1,267 +1,278 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
const
|
13
|
-
const
|
14
|
-
const
|
15
|
-
const
|
16
|
-
const
|
17
|
-
const
|
18
|
-
const
|
19
|
-
const
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
}
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
}
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
return host;
|
81
|
-
};
|
82
|
-
}
|
83
|
-
function
|
84
|
-
return (host) => {
|
85
|
-
const
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
modifyFileRule(appModulePath,
|
116
|
-
modifyFileRule(appModulePath,
|
117
|
-
modifyFileRule(appModulePath, importSetter('
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
}
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
const
|
180
|
-
|
181
|
-
|
182
|
-
}
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
}
|
197
|
-
const
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
const
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
const
|
221
|
-
const
|
222
|
-
const
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
const
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
|
259
|
-
|
260
|
-
|
261
|
-
|
262
|
-
}
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
|
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 schematics_1 = require("@angular-devkit/schematics");
|
13
|
+
const core_1 = require("@angular-devkit/core");
|
14
|
+
const path_1 = require("path");
|
15
|
+
const project_1 = require("../utility/project");
|
16
|
+
const string_1 = require("../utility/string");
|
17
|
+
const styles_1 = require("../utility/styles");
|
18
|
+
const modify_json_file_1 = require("../utility/modify-json-file");
|
19
|
+
const dependencies_1 = require("@schematics/angular/utility/dependencies");
|
20
|
+
const tasks_1 = require("@angular-devkit/schematics/tasks");
|
21
|
+
const source_1 = require("../utility/source");
|
22
|
+
const change_1 = require("../utility/change");
|
23
|
+
const routing_1 = require("../utility/routing");
|
24
|
+
const ast_utils_1 = require("@schematics/angular/utility/ast-utils");
|
25
|
+
const workspace_1 = require("@schematics/angular/utility/workspace");
|
26
|
+
const projectFilesSource = './files/src';
|
27
|
+
const workspaceFilesSource = './files';
|
28
|
+
function addScriptSafe(scripts, name, value) {
|
29
|
+
const currentValue = scripts[name];
|
30
|
+
if (!currentValue) {
|
31
|
+
scripts[name] = value;
|
32
|
+
return;
|
33
|
+
}
|
34
|
+
const alterName = `origin-${name}`;
|
35
|
+
const safeValue = `npm run ${alterName} && ${value}`;
|
36
|
+
if (currentValue === value || currentValue === safeValue) {
|
37
|
+
return;
|
38
|
+
}
|
39
|
+
scripts[alterName] = currentValue;
|
40
|
+
scripts[name] = safeValue;
|
41
|
+
}
|
42
|
+
function addBuildThemeScript() {
|
43
|
+
return (host) => {
|
44
|
+
modify_json_file_1.modifyJSONFile(host, './package.json', config => {
|
45
|
+
const scripts = config['scripts'];
|
46
|
+
addScriptSafe(scripts, 'build-themes', 'devextreme build');
|
47
|
+
addScriptSafe(scripts, 'postinstall', 'npm run build-themes');
|
48
|
+
return config;
|
49
|
+
});
|
50
|
+
return host;
|
51
|
+
};
|
52
|
+
}
|
53
|
+
function addCustomThemeStyles(host, options, sourcePath = '') {
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
55
|
+
const projectName = yield project_1.getProjectName(host, options.project);
|
56
|
+
modify_json_file_1.modifyJSONFile(host, './angular.json', config => {
|
57
|
+
const stylesList = [
|
58
|
+
`${sourcePath}/dx-styles.scss`,
|
59
|
+
`${sourcePath}/themes/generated/theme.additional.css`,
|
60
|
+
`${sourcePath}/themes/generated/theme.base.css`,
|
61
|
+
'node_modules/devextreme/dist/css/dx.common.css'
|
62
|
+
];
|
63
|
+
return styles_1.addStylesToApp(projectName, config, stylesList);
|
64
|
+
});
|
65
|
+
return host;
|
66
|
+
});
|
67
|
+
}
|
68
|
+
function updateBudgets(host, options) {
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
70
|
+
const projectName = yield project_1.getProjectName(host, options.project);
|
71
|
+
modify_json_file_1.modifyJSONFile(host, './angular.json', config => {
|
72
|
+
const budgets = config.projects[projectName].architect.build.configurations.production.budgets;
|
73
|
+
const budget = budgets.find((item) => item.type === 'initial');
|
74
|
+
if (budget) {
|
75
|
+
budget.maximumWarning = '4mb';
|
76
|
+
budget.maximumError = '7mb';
|
77
|
+
}
|
78
|
+
return config;
|
79
|
+
});
|
80
|
+
return host;
|
81
|
+
});
|
82
|
+
}
|
83
|
+
function addViewportToBody(sourcePath = '') {
|
84
|
+
return (host) => {
|
85
|
+
const indexPath = path_1.join(sourcePath, 'index.html');
|
86
|
+
let indexContent = host.read(indexPath).toString();
|
87
|
+
indexContent = indexContent.replace(/<body>/, '<body class="dx-viewport">');
|
88
|
+
host.overwrite(indexPath, indexContent);
|
89
|
+
return host;
|
90
|
+
};
|
91
|
+
}
|
92
|
+
function modifyFileRule(path, callback) {
|
93
|
+
return (host) => {
|
94
|
+
const source = source_1.getSourceFile(host, path);
|
95
|
+
if (!source) {
|
96
|
+
return host;
|
97
|
+
}
|
98
|
+
const changes = callback(source);
|
99
|
+
return change_1.applyChanges(host, changes, path);
|
100
|
+
};
|
101
|
+
}
|
102
|
+
function updateAppModule(host, sourcePath) {
|
103
|
+
const appModulePath = sourcePath + 'app.module.ts';
|
104
|
+
const importSetter = (importName, path) => {
|
105
|
+
return (source) => {
|
106
|
+
return ast_utils_1.addImportToModule(source, appModulePath, importName, path);
|
107
|
+
};
|
108
|
+
};
|
109
|
+
const providerSetter = (importName, path) => {
|
110
|
+
return (source) => {
|
111
|
+
return ast_utils_1.addProviderToModule(source, appModulePath, importName, path);
|
112
|
+
};
|
113
|
+
};
|
114
|
+
const rules = [
|
115
|
+
modifyFileRule(appModulePath, importSetter('SideNavOuterToolbarModule', './layouts')),
|
116
|
+
modifyFileRule(appModulePath, importSetter('SideNavInnerToolbarModule', './layouts')),
|
117
|
+
modifyFileRule(appModulePath, importSetter('SingleCardModule', './layouts')),
|
118
|
+
modifyFileRule(appModulePath, importSetter('FooterModule', './shared/components')),
|
119
|
+
modifyFileRule(appModulePath, importSetter('ResetPasswordFormModule', './shared/components')),
|
120
|
+
modifyFileRule(appModulePath, importSetter('CreateAccountFormModule', './shared/components')),
|
121
|
+
modifyFileRule(appModulePath, importSetter('ChangePasswordFormModule', './shared/components')),
|
122
|
+
modifyFileRule(appModulePath, importSetter('LoginFormModule', './shared/components')),
|
123
|
+
modifyFileRule(appModulePath, providerSetter('AuthService', './shared/services')),
|
124
|
+
modifyFileRule(appModulePath, providerSetter('ScreenService', './shared/services')),
|
125
|
+
modifyFileRule(appModulePath, providerSetter('AppInfoService', './shared/services')),
|
126
|
+
modifyFileRule(appModulePath, importSetter('UnauthenticatedContentModule', './unauthenticated-content')),
|
127
|
+
];
|
128
|
+
if (!hasRoutingModule(host, sourcePath)) {
|
129
|
+
rules.push(modifyFileRule(appModulePath, importSetter('AppRoutingModule', './app-routing.module')));
|
130
|
+
}
|
131
|
+
return schematics_1.chain(rules);
|
132
|
+
}
|
133
|
+
function getComponentName(host, sourcePath) {
|
134
|
+
let name = '';
|
135
|
+
const index = 1;
|
136
|
+
if (!host.exists(sourcePath + 'app.component.ts')) {
|
137
|
+
name = 'app';
|
138
|
+
}
|
139
|
+
while (!name) {
|
140
|
+
const componentName = `app${index}`;
|
141
|
+
if (!host.exists(`${sourcePath}${componentName}.component.ts`)) {
|
142
|
+
name = componentName;
|
143
|
+
}
|
144
|
+
}
|
145
|
+
return name;
|
146
|
+
}
|
147
|
+
function hasRoutingModule(host, sourcePath) {
|
148
|
+
return host.exists(sourcePath + 'app-routing.module.ts');
|
149
|
+
}
|
150
|
+
function addPackagesToDependency(globalNgCliVersion) {
|
151
|
+
return (host) => {
|
152
|
+
dependencies_1.addPackageJsonDependency(host, {
|
153
|
+
type: dependencies_1.NodeDependencyType.Default,
|
154
|
+
name: '@angular/cdk',
|
155
|
+
version: globalNgCliVersion
|
156
|
+
});
|
157
|
+
return host;
|
158
|
+
};
|
159
|
+
}
|
160
|
+
function modifyContentByTemplate(sourcePath = '', templateSourcePath, filePath, templateOptions = {}, modifyContent) {
|
161
|
+
return (host, context) => {
|
162
|
+
const modifyIfExists = (fileEntry) => {
|
163
|
+
const fileEntryPath = path_1.join(sourcePath, fileEntry.path.toString());
|
164
|
+
if (!host.exists(fileEntryPath)) {
|
165
|
+
return fileEntry;
|
166
|
+
}
|
167
|
+
const templateContent = fileEntry.content.toString();
|
168
|
+
let modifiedContent = templateContent;
|
169
|
+
const currentContent = host.read(fileEntryPath).toString();
|
170
|
+
if (modifyContent) {
|
171
|
+
modifiedContent = modifyContent(templateContent, currentContent, fileEntryPath);
|
172
|
+
}
|
173
|
+
// NOTE: Workaround for https://github.com/angular/angular-cli/issues/11337
|
174
|
+
if (modifiedContent !== currentContent) {
|
175
|
+
host.overwrite(fileEntryPath, modifiedContent);
|
176
|
+
}
|
177
|
+
return null;
|
178
|
+
};
|
179
|
+
const rules = [
|
180
|
+
schematics_1.filter(path => {
|
181
|
+
return !filePath || path_1.join('./', path) === path_1.join('./', filePath);
|
182
|
+
}),
|
183
|
+
schematics_1.template(templateOptions),
|
184
|
+
schematics_1.forEach(modifyIfExists),
|
185
|
+
schematics_1.move(sourcePath)
|
186
|
+
];
|
187
|
+
const modifiedSource = schematics_1.apply(schematics_1.url(templateSourcePath), rules);
|
188
|
+
const resultRule = schematics_1.mergeWith(modifiedSource);
|
189
|
+
return schematics_1.callRule(resultRule, host, context);
|
190
|
+
};
|
191
|
+
}
|
192
|
+
function updateDevextremeConfig(sourcePath = '') {
|
193
|
+
const devextremeConfigPath = '/devextreme.json';
|
194
|
+
const templateOptions = {
|
195
|
+
sourcePath
|
196
|
+
};
|
197
|
+
const modifyConfig = (templateContent, currentContent) => {
|
198
|
+
const oldConfig = JSON.parse(currentContent);
|
199
|
+
const newConfig = JSON.parse(templateContent);
|
200
|
+
[].push.apply(oldConfig.build.commands, newConfig.build.commands);
|
201
|
+
return JSON.stringify(oldConfig, null, ' ');
|
202
|
+
};
|
203
|
+
return modifyContentByTemplate('./', workspaceFilesSource, devextremeConfigPath, templateOptions, modifyConfig);
|
204
|
+
}
|
205
|
+
const modifyRoutingModule = (host, routingModulePath) => {
|
206
|
+
// TODO: Try to use the isolated host to generate the result string
|
207
|
+
let source = source_1.getSourceFile(host, routingModulePath);
|
208
|
+
const importChange = ast_utils_1.insertImport(source, routingModulePath, 'LoginFormComponent', './shared/components');
|
209
|
+
const providerChanges = ast_utils_1.addProviderToModule(source, routingModulePath, 'AuthGuardService', './shared/services');
|
210
|
+
change_1.applyChanges(host, [importChange, ...providerChanges], routingModulePath);
|
211
|
+
source = source_1.getSourceFile(host, routingModulePath);
|
212
|
+
const routes = routing_1.findRoutesInSource(source);
|
213
|
+
if (!routing_1.hasComponentInRoutes(routes, 'login-form')) {
|
214
|
+
const loginFormRoute = routing_1.getRoute('login-form');
|
215
|
+
change_1.insertItemToArray(host, routingModulePath, routes, loginFormRoute);
|
216
|
+
}
|
217
|
+
};
|
218
|
+
function default_1(options) {
|
219
|
+
return (host) => __awaiter(this, void 0, void 0, function* () {
|
220
|
+
const ngConfig = host.read('./angular.json').toString();
|
221
|
+
const defaultProjectName = modify_json_file_1.parseJson(ngConfig).defaultProject;
|
222
|
+
const project = yield project_1.getProjectName(host, options.project);
|
223
|
+
const workspace = yield workspace_1.getWorkspace(host);
|
224
|
+
const ngProject = workspace.projects.get(project);
|
225
|
+
const prefix = ngProject === null || ngProject === void 0 ? void 0 : ngProject.prefix;
|
226
|
+
const title = string_1.humanize(project);
|
227
|
+
const appPath = yield project_1.getApplicationPath(host, project);
|
228
|
+
const sourcePath = yield project_1.getSourceRootPath(host, project);
|
229
|
+
const layout = options.layout;
|
230
|
+
const override = options.resolveConflicts === 'override';
|
231
|
+
const componentName = override ? 'app' : getComponentName(host, appPath);
|
232
|
+
const pathToCss = sourcePath === null || sourcePath === void 0 ? void 0 : sourcePath.replace(/\/?(\w)+\/?/g, '../');
|
233
|
+
const templateOptions = {
|
234
|
+
name: componentName,
|
235
|
+
layout,
|
236
|
+
title,
|
237
|
+
strings: core_1.strings,
|
238
|
+
path: pathToCss,
|
239
|
+
prefix
|
240
|
+
};
|
241
|
+
const modifyContent = (templateContent, currentContent, filePath) => {
|
242
|
+
if (path_1.basename(filePath) === 'styles.scss') {
|
243
|
+
return `${currentContent}\n${templateContent}`;
|
244
|
+
}
|
245
|
+
if (path_1.basename(filePath) === 'app-routing.module.ts' && hasRoutingModule(host, appPath)) {
|
246
|
+
modifyRoutingModule(host, filePath);
|
247
|
+
return currentContent;
|
248
|
+
}
|
249
|
+
return templateContent;
|
250
|
+
};
|
251
|
+
const rules = [
|
252
|
+
modifyContentByTemplate(sourcePath, projectFilesSource, null, templateOptions, modifyContent),
|
253
|
+
updateDevextremeConfig(sourcePath),
|
254
|
+
updateAppModule(host, appPath),
|
255
|
+
addBuildThemeScript(),
|
256
|
+
() => addCustomThemeStyles(host, options, sourcePath),
|
257
|
+
addViewportToBody(sourcePath),
|
258
|
+
addPackagesToDependency(options.globalNgCliVersion)
|
259
|
+
];
|
260
|
+
if (options.updateBudgets) {
|
261
|
+
rules.push(() => updateBudgets(host, options));
|
262
|
+
}
|
263
|
+
if (!options.skipInstall) {
|
264
|
+
rules.push((_, context) => {
|
265
|
+
context.addTask(new tasks_1.NodePackageInstallTask());
|
266
|
+
});
|
267
|
+
}
|
268
|
+
if (override) {
|
269
|
+
if (project === defaultProjectName) {
|
270
|
+
rules.push(modifyContentByTemplate('./', workspaceFilesSource, 'e2e/src/app.e2e-spec.ts', { title }));
|
271
|
+
rules.push(modifyContentByTemplate('./', workspaceFilesSource, 'e2e/src/app.po.ts'));
|
272
|
+
}
|
273
|
+
}
|
274
|
+
return schematics_1.chain(rules);
|
275
|
+
});
|
276
|
+
}
|
277
|
+
exports.default = default_1;
|
267
278
|
//# 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,2DAcoC;AAMpC,+CAA+C;AAE/C,+BAAsC;AAEtC,gDAI6B;AAE7B,8CAE2B;AAE3B,8CAE4B;AAE5B,kEAGsC;AAEtC,2EAGkD;AAElD,4DAE0C;AAE1C,8CAAkD;AAElD,8CAG2B;AAE3B,gDAI4B;AAE5B,qEAE+C;AAE/C,qEAAqE;AAGrE,MAAM,kBAAkB,GAAG,aAAa,CAAC;AACzC,MAAM,oBAAoB,GAAG,SAAS,CAAC;AAEvC,SAAS,aAAa,CAAC,OAAY,EAAE,IAAY,EAAE,KAAa;IAC9D,MAAM,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnC,IAAI,CAAC,YAAY,EAAE;QACjB,OAAO,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;QACtB,OAAO;KACR;IAED,MAAM,SAAS,GAAG,U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