Skip to content

chore(license): add LICENSE files to all packages #3926

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions scripts/publish/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down