const { readdirSync } = require('fs'); const { join } = require('path'); module.exports = function getPackages() { return ['base-components', 'extend-components'] .map((dir) => { const list = readdirSync(join(__dirname, '../../packages', dir)).map( (item) => `${item}!${dir}`, ); return list.filter((pkg) => pkg.charAt(0) !== '.'); }) .flat(); };