From 13d2786b7b51df927c8976dc767cc27e88bc8e84 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Mon, 10 Sep 2018 22:34:27 +0200 Subject: Moved scripts/copyAssets.js to resources folder and fixed formatting --- package.json | 4 ++-- resources/assets/scripts/copyAssets.js | 25 +++++++++++++++++++++++++ scripts/copyAssets.js | 25 ------------------------- 3 files changed, 27 insertions(+), 27 deletions(-) create mode 100644 resources/assets/scripts/copyAssets.js delete mode 100644 scripts/copyAssets.js diff --git a/package.json b/package.json index d671bda6..3c6dbca1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "engelsystem", - "version": "1.0.0", + "version": "1.1.0", "main": "index.js", "repository": "https://github.com/engelsystem/engelsystem.git", "author": "marudor ", @@ -8,7 +8,7 @@ "scripts": { "build": "npm run -s build:clean && NODE_ENV=production run-p build:assets build:webpack", "build:clean": "rimraf public/assets", - "build:assets": "node scripts/copyAssets.js", + "build:assets": "node resources/assets/scripts/copyAssets.js", "build:webpack": "webpack", "build:watch": "webpack --watch" }, 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); + } + }); +}); diff --git a/scripts/copyAssets.js b/scripts/copyAssets.js deleted file mode 100644 index 3c425baa..00000000 --- a/scripts/copyAssets.js +++ /dev/null @@ -1,25 +0,0 @@ -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); - } - }); -}); -- cgit v1.2.3-54-g00ecf