2021-01-18 11:20:34 +00:00
|
|
|
const fs = require('fs-extra');
|
|
|
|
const path = require('path');
|
|
|
|
|
|
|
|
fs.readdirSync(path.resolve(__dirname, './src/components/')).forEach(folder => {
|
|
|
|
fs.readdirSync(path.resolve(__dirname, './src/components/' + folder)).forEach(file => {
|
2021-01-18 15:38:34 +00:00
|
|
|
if (file ==='package.json' || file.endsWith('d.ts') || file.endsWith('vue')) {
|
2021-01-18 11:20:34 +00:00
|
|
|
fs.copySync(path.resolve(__dirname, './src/components/' + folder) + '/' + file, 'dist/' + folder + '/' + file);
|
|
|
|
}
|
2021-01-18 15:38:34 +00:00
|
|
|
})
|
2021-01-18 11:20:34 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
fs.copySync(path.resolve(__dirname, './package-build.json'), 'dist/package.json');
|
|
|
|
fs.copySync(path.resolve(__dirname, './README.md'), 'dist/README.md');
|
|
|
|
fs.copySync(path.resolve(__dirname, './LICENSE.md'), 'dist/LICENSE.md');
|