Skip to content

Commit 3903e6d

Browse files
committed
add LICENSE to sub pkgs
1 parent b1f32e3 commit 3903e6d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tasks/sync_packages.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,18 @@ packagesSpecs.forEach(function(d) {
100100
);
101101
}
102102

103-
function copyDist(cb) {
103+
function copyMain(cb) {
104104
fs.copy(d.dist, path.join(pkgPath, d.main), cb);
105105
}
106106

107+
function copyLicense(cb) {
108+
fs.copy(
109+
path.join(constants.pathToRoot, 'LICENSE'),
110+
path.join(pkgPath, 'LICENSE'),
111+
cb
112+
);
113+
}
114+
107115
function publishToNPM(cb) {
108116
if(process.env.DRYRUN) {
109117
console.log('dry run, did not publish ' + d.name);
@@ -117,7 +125,8 @@ packagesSpecs.forEach(function(d) {
117125
initDirectory,
118126
writePackageJSON,
119127
writeREADME,
120-
copyDist,
128+
copyMain,
129+
copyLicense,
121130
publishToNPM
122131
], function(err) {
123132
if(err) throw err;

0 commit comments

Comments
 (0)