Skip to content
This repository has been archived by the owner on Apr 9, 2022. It is now read-only.

Commit

Permalink
fix(@angular-devkit/schematics): use loose mode for collection.json
Browse files Browse the repository at this point in the history
So that the collection.json can include comments and other goodies. Note that the
package.json is still using require() as it is a regular node file and would fail
npm anyway, so no incentive for us to make it loose.
  • Loading branch information
hansl committed Sep 26, 2017
1 parent 78e3867 commit 3842600
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {
} from './description';
import { ExportStringRef } from './export-ref';
import { FileSystemEngineHostBase } from './file-system-engine-host-base';
import { readJsonFile } from './file-system-utility';


/**
Expand Down Expand Up @@ -51,7 +52,7 @@ export class NodeModulesEngineHost extends FileSystemEngineHostBase {
const pkgJsonSchematics = require(packageJsonPath)['schematics'];
if (pkgJsonSchematics) {
const resolvedPath = this._resolvePath(pkgJsonSchematics, dirname(packageJsonPath), false);
require(resolvedPath);
readJsonFile(resolvedPath);

return resolvedPath;
}
Expand Down

0 comments on commit 3842600

Please sign in to comment.