build all packages

This commit is contained in:
Harvey Zack committed 2019-05-06 15:48:38 +08:00
1 parent 952b66898a
commit b64fe65164
15 files changed
+28 -24

No files matched your search

+14 -10
View File
@@ -10,16 +10,20 @@ const isBuildAll = process.argv.pop() === 'all';
function build(projectPath) {
const { input, output, plugins } = creatRollupConfig(projectPath);
logger.log(`bundling ${output.file}...`);
return rollup
.rollup({
input,
plugins,
})
.then(bundle => {
bundle.write(output);
logger.success(`finished building all bundles from ${projectPath}`);
});
const dist = path.join(projectPath, 'dist');
return del(dist).then(() => {
logger.success(`----Delete directory successfully: ${dist}----`);
logger.log(`bundling ${output.file}...`);
return rollup
.rollup({
input,
plugins,
})
.then(bundle => {
bundle.write(output);
logger.success(`finished building all bundles from ${projectPath}`);
});
});
}
if (isBuildAll) {