mirror of
https://github.com/angular/angular-cli.git
synced 2025-05-16 18:43:42 +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(() => {
|
.then(() => {
|
||||||
// Copy all resources that might have been missed.
|
// Copy all resources that might have been missed.
|
||||||
return Promise.all([
|
const extraFiles = ['CHANGELOG.md', 'CONTRIBUTING.md', 'README.md'];
|
||||||
'CHANGELOG.md', 'CONTRIBUTING.md', 'LICENSE', 'README.md'
|
return Promise.all(extraFiles.map(fileName => {
|
||||||
].map(fileName => {
|
|
||||||
console.log(`Copying ${fileName}...`);
|
console.log(`Copying ${fileName}...`);
|
||||||
return copy(fileName, path.join('dist/angular-cli', 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) => {
|
.then(() => process.exit(0), (err) => {
|
||||||
console.error(chalk.red(err.message));
|
console.error(chalk.red(err.message));
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user