vant/build/get-components.js
2018-12-14 14:24:23 +08:00

17 lines
330 B
JavaScript

const fs = require('fs');
const path = require('path');
const excludes = [
'index.js',
'index.less',
'style',
'mixins',
'utils',
'.DS_Store'
];
module.exports = function () {
const dirs = fs.readdirSync(path.resolve(__dirname, '../packages'));
return dirs.filter(dirName => excludes.indexOf(dirName) === -1);
};