fix: update schematics for libs to indicate if the app dir should be added

This commit is contained in:
vsavkin 2017-08-27 18:45:30 -04:00
parent 98c5d67fe2
commit 53a71f1a9c
2 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ function addLibToAngularCliJson(fullPath: string, schema: Schema): Rule {
source.apps.push({
name: schema.name,
root: fullPath,
appDir: false
});
host.overwrite('.angular-cli.json', JSON.stringify(source, null, 2));
return host;

View File

@ -6,7 +6,7 @@ import {names, toFileName} from '../name-utils';
function addLibToAngularCliJson(fullPath: string, schema: Schema): Rule {
return (host: Tree) => {
const source = JSON.parse(host.read('.angular-cli.json')!.toString('utf-8'));
source.apps.push({name: schema.name, root: fullPath, prefix: schema.prefix ? schema.prefix : schema.name});
source.apps.push({name: schema.name, root: fullPath, appDir: false, prefix: schema.prefix ? schema.prefix : schema.name});
host.overwrite('.angular-cli.json', JSON.stringify(source, null, 2));
return host;
};