Distribute src/assets

This commit is contained in:
Alice Gaudon 2021-11-20 15:34:58 +01:00
parent a753122290
commit 7dde32edb4

View File

@ -1,5 +1,6 @@
const fs = require('fs');
const path = require('path');
const {copyRecursively} = require("./_functions");
// These folders must exist for nodemon not to loop indefinitely.
[
@ -17,5 +18,10 @@ if (!fs.existsSync(symlink)) {
fs.symlinkSync(path.resolve('dist/common'), symlink);
}
// Copy assets
fs.readdirSync('src/assets').forEach(file => {
copyRecursively(path.join('src/assets', file), 'dist/assets');
});
// Copy package.json
fs.copyFileSync('package.json', 'dist/package.json');