Distribute src/assets
This commit is contained in:
parent
a753122290
commit
7dde32edb4
@ -1,5 +1,6 @@
|
|||||||
const fs = require('fs');
|
const fs = require('fs');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
|
const {copyRecursively} = require("./_functions");
|
||||||
|
|
||||||
// These folders must exist for nodemon not to loop indefinitely.
|
// 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);
|
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
|
// Copy package.json
|
||||||
fs.copyFileSync('package.json', 'dist/package.json');
|
fs.copyFileSync('package.json', 'dist/package.json');
|
||||||
|
Loading…
Reference in New Issue
Block a user