forked from primefaces/primevue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build-meta.js
17 lines (15 loc) · 914 Bytes
/
build-meta.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
const fs = require('fs-extra');
const path = require('path');
fs.readdirSync(path.resolve(__dirname, './src/components/'), { withFileTypes: true })
.filter(dir => dir.isDirectory())
.forEach(({ name: folderName }) => {
fs.readdirSync(path.resolve(__dirname, './src/components/' + folderName)).forEach(file => {
if (file ==='package.json' || file.endsWith('d.ts') || file.endsWith('vue')) {
fs.copySync(path.resolve(__dirname, './src/components/' + folderName) + '/' + file, 'dist/' + folderName + '/' + file);
}
})
});
fs.copySync(path.resolve(__dirname, './src/components/ts-helpers.d.ts'), 'dist/ts-helpers.d.ts');
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');