Files
ArtPlayer/scripts/getProjects.js
T
2018-12-03 11:15:43 +08:00

12 lines
312 B
JavaScript

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;
};