2022-01-13 14:28:18 +00:00
|
|
|
const { readdirSync, copyFileSync } = require('fs');
|
2021-12-11 00:45:56 +00:00
|
|
|
const { join } = require('path');
|
|
|
|
|
2021-12-13 10:56:24 +00:00
|
|
|
const rootDir = join(__dirname, '..');
|
|
|
|
|
|
|
|
const polyfillsDir = join(rootDir, 'polyfills');
|
2021-12-11 00:45:56 +00:00
|
|
|
for (const file of readdirSync(polyfillsDir)) {
|
|
|
|
const [ name ] = file.split('.');
|
|
|
|
const jsPath = join(polyfillsDir, file);
|
|
|
|
|
2022-01-13 14:28:18 +00:00
|
|
|
copyFileSync(jsPath, join(rootDir, 'src', 'node_modules', name + '.js'));
|
2021-12-11 00:45:56 +00:00
|
|
|
}
|