ff-stream-web

git clone git://archive.git.mtrnord.blog/MTRNord/ff-stream-web.git
Log | Files | Refs | README | LICENSE

commit 5e13920257c22262f82a56b2de389ecc3751dbc4
parent c948d5d36de18c1696a809a482aa4f86a7c3e19e
Author: Pavel Lang <langpavel@phpskelet.org>
Date:   Thu, 28 Apr 2016 14:55:56 +0200

[fix] linter error

Diffstat:
Mtools/copy.js | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/copy.js b/tools/copy.js @@ -37,12 +37,14 @@ async function copy({ watch } = {}) { const watcher = await new Promise((resolve, reject) => { gaze('src/content/**/*.*', (err, val) => err ? reject(err) : resolve(val)); }); + const cp = async (file) => { const relPath = file.substr(path.join(__dirname, '../src/content/').length); await ncp(`src/content/${relPath}`, `build/content/${relPath}`); - } + }; + watcher.on('changed', cp); - watcher.on('added', cp); + watcher.on('added', cp); } }