swaf/scripts/dist.js

19 lines
371 B
JavaScript
Raw Permalink Normal View History

import fs from "fs";
import path from "path";
import {copyRecursively} from "./_functions.js";
[
'yarn.lock',
'README.md',
'config/',
].forEach(file => {
copyRecursively(file, 'dist');
});
fs.mkdirSync('dist/types', {recursive: true});
fs.readdirSync('src/types').forEach(file => {
copyRecursively(path.join('src/types', file), 'dist/types');
});