build all packages

This commit is contained in:
Harvey committed 2020-06-30 13:43:45 +08:00
1 parent 592302975f
commit 9a6e3e0fb6
17 files changed
+49 -46

No files matched your search

+4 -5
View File
@@ -2,10 +2,9 @@ const path = require('path');
const glob = require('glob');
module.exports = function getProjects() {
const projects = {};
glob.sync(path.join(process.cwd(), 'packages/*')).forEach(item => {
return glob.sync(path.join(process.cwd(), 'packages/*')).reduce((result, item) => {
const name = item.split(path.sep).pop();
projects[name] = item;
});
return projects;
result[name] = item;
return result;
}, {});
};