ff-stream-web

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

commit c948d5d36de18c1696a809a482aa4f86a7c3e19e
parent 5e4bacbe07084396eda978b2b7ca246cc72506b3
Author: Konstantin Tarkus <koistya@gmail.com>
Date:   Sat, 23 Apr 2016 07:44:50 +0300

Merge pull request #615 from zwhitchcox/patch-4

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

diff --git a/tools/copy.js b/tools/copy.js @@ -37,10 +37,12 @@ async function copy({ watch } = {}) { const watcher = await new Promise((resolve, reject) => { gaze('src/content/**/*.*', (err, val) => err ? reject(err) : resolve(val)); }); - watcher.on('changed', async (file) => { + 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); } }