mirror of
https://github.com/toji/gl-matrix.git
synced 2026-01-25 14:42:43 +00:00
- All util and config files have been converted to ESM - Use file extensions in import calls spec files - Use Node 14.17.0 in Travis
18 lines
532 B
JavaScript
18 lines
532 B
JavaScript
import fs from 'fs';
|
|
|
|
const pkgStr = fs.readFileSync(new URL('../package.json', import.meta.url), 'utf-8');
|
|
const pkg = JSON.parse(pkgStr.replace(/\.\/dist\//g, './'));
|
|
|
|
const copyFileSync = (source, dest) => {
|
|
const content = fs.readFileSync(source, 'utf-8');
|
|
fs.writeFileSync(dest, content);
|
|
};
|
|
|
|
delete pkg.private;
|
|
delete pkg.scripts;
|
|
delete pkg.devDependencies;
|
|
fs.writeFileSync('dist/package.json', JSON.stringify(pkg, null, 2));
|
|
|
|
copyFileSync('README.md', 'dist/README.md');
|
|
copyFileSync('LICENSE.md', 'dist/LICENSE.md');
|