From 7dde32edb4c7e97e421fcba86493e371eb7ed5c7 Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sat, 20 Nov 2021 15:34:58 +0100 Subject: [PATCH] Distribute src/assets --- scripts/prepare-sources.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/prepare-sources.js b/scripts/prepare-sources.js index 4f7982d..468c2d7 100644 --- a/scripts/prepare-sources.js +++ b/scripts/prepare-sources.js @@ -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');