Skip to content

Commit bcf6ead

Browse files
committed
fix(@schematics/angular): warn when migrating to v6 if asset glob is missing
1 parent 823a8be commit bcf6ead

File tree

1 file changed

+8
-1
lines changed
  • packages/schematics/angular/migrations/update-6

1 file changed

+8
-1
lines changed

packages/schematics/angular/migrations/update-6/index.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ function extractProjectsConfig(
260260
const outDir = app.outDir || defaults.outDir;
261261
const appRoot = app.root || defaults.appRoot;
262262

263-
function _mapAssets(asset: string | JsonObject) {
263+
function _mapAssets(asset: string | { glob?: string; input?: string; output?: string; allowOutsideOutDir?: boolean}) {
264264
if (typeof asset === 'string') {
265265
return normalize(appRoot + '/' + asset);
266266
} else {
@@ -270,6 +270,13 @@ function extractProjectsConfig(
270270
uses the 'allowOutsideOutDir' option which is not supported in Angular CLI 6.
271271
`);
272272

273+
return null;
274+
} else if (!asset.glob) {
275+
logger.warn(tags.oneLine`
276+
Asset with input '${asset.input}' was not migrated because it
277+
does not contain a glob property.
278+
`);
279+
273280
return null;
274281
} else if (asset.output) {
275282
return {

0 commit comments

Comments
 (0)