feat(schematics) check to see if a library is publishable before trying to update ng-package.prod.json

This commit is contained in:
Jonathan Cammisuli 2018-06-27 14:02:36 -04:00 committed by Victor Savkin
parent 9ce52af41f
commit 73d0fb21d0

View File

@ -304,10 +304,14 @@ describe('${options.moduleName}', () => {
}
};
}),
updateJsonInTree(`${options.projectRoot}/ng-package.prod.json`, json => {
json['dest'] = `${offsetFromRoot(options.projectRoot)}dist/@${options.prefix}/${options.name}`;
return json;
}),
options.publishable
? updateJsonInTree(`${options.projectRoot}/ng-package.prod.json`, json => {
return {
...json,
dest: `${offsetFromRoot(options.projectRoot)}dist/@${options.prefix}/${options.projectDirectory}`
}
})
: noop(),
host => {
const karma = host
.read(`${options.projectRoot}/karma.conf.js`)