summaryrefslogtreecommitdiff
path: root/resources/assets/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'resources/assets/scripts')
-rw-r--r--resources/assets/scripts/copyAssets.js25
1 files changed, 25 insertions, 0 deletions
diff --git a/resources/assets/scripts/copyAssets.js b/resources/assets/scripts/copyAssets.js
new file mode 100644
index 00000000..1c8e9e24
--- /dev/null
+++ b/resources/assets/scripts/copyAssets.js
@@ -0,0 +1,25 @@
+const fs = require('fs');
+const path = require('path');
+const mkdirp = require('mkdirp');
+
+const baseAssetPath = {
+ src: path.resolve('resources/assets'),
+ target: path.resolve('public/assets')
+};
+
+const emojiPath = {
+ src: baseAssetPath.src + '/emojis',
+ target: baseAssetPath.target + '/emojis'
+};
+
+mkdirp.sync(emojiPath.target);
+
+const emojis = fs.readdirSync(emojiPath.src);
+
+emojis.forEach((e) => {
+ fs.copyFile(`${emojiPath.src}/${e}`, `${emojiPath.target}/${e}`, (e) => {
+ if (e) {
+ console.error(e);
+ }
+ });
+});