swaf/scripts/prepare-sources.js

13 lines
291 B
JavaScript

const fs = require('fs');
const path = require('path');
fs.copyFileSync('package.json', path.join('src', 'package.json'));
// These folders must exist for nodemon not to loop indefinitely.
[
'build',
'public',
].forEach(dir => {
if (!fs.existsSync(dir)) fs.mkdirSync(dir);
});