mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 02:24:10 +08:00
chore(license): add LICENSE files to all packages (#3926)
This commit is contained in:
parent
c2dd03e99c
commit
979e4f96da
@ -154,13 +154,23 @@ Promise.resolve()
|
||||
})
|
||||
.then(() => {
|
||||
// Copy all resources that might have been missed.
|
||||
return Promise.all([
|
||||
'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md'
|
||||
].map(fileName => {
|
||||
const extraFiles = ['CHANGELOG.md', 'CONTRIBUTING.md', 'README.md'];
|
||||
return Promise.all(extraFiles.map(fileName => {
|
||||
console.log(`Copying ${fileName}...`);
|
||||
return copy(fileName, path.join('dist/angular-cli', fileName));
|
||||
}));
|
||||
})
|
||||
.then(() => {
|
||||
// Copy LICENSE into all the packages
|
||||
console.log(`Copying LICENSE...`);
|
||||
|
||||
const packages = require('../../lib/packages');
|
||||
return Promise.all(Object.keys(packages).map(pkgName => {
|
||||
const pkg = packages[pkgName];
|
||||
console.log(` ${pkgName}`);
|
||||
return copy('LICENSE', path.join(pkg.dist, 'LICENSE'));
|
||||
}));
|
||||
})
|
||||
.then(() => process.exit(0), (err) => {
|
||||
console.error(chalk.red(err.message));
|
||||
process.exit(1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user