完成dev脚本

This commit is contained in:
Harvey Zack committed 2018-12-03 11:15:43 +08:00
1 parent c2bbe15e79
commit cc2027832e
7 files changed
+118 -12

No files matched your search

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