From 575de5ebb191671f261ea016701cac7c1cde5aac Mon Sep 17 00:00:00 2001 From: Alice Gaudon Date: Sat, 20 Nov 2021 15:43:20 +0100 Subject: [PATCH] Copy assets to dist folder at dist step --- scripts/dist.js | 4 ++++ scripts/prepare-sources.js | 5 ----- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/scripts/dist.js b/scripts/dist.js index bfbf891..a0ead2a 100644 --- a/scripts/dist.js +++ b/scripts/dist.js @@ -16,3 +16,7 @@ fs.mkdirSync('dist/types', {recursive: true}); fs.readdirSync('src/types').forEach(file => { copyRecursively(path.join('src/types', file), 'dist/types'); }); + +fs.readdirSync('src/assets').forEach(file => { + copyRecursively(path.join('src/assets', file), 'dist/assets'); +}); diff --git a/scripts/prepare-sources.js b/scripts/prepare-sources.js index 468c2d7..854d9c2 100644 --- a/scripts/prepare-sources.js +++ b/scripts/prepare-sources.js @@ -18,10 +18,5 @@ 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');