www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | Submodules | README | LICENSE

commit e9a80cb5303ba006bdd29a6ccdf368593a8776cd
parent 145a45e8e174eaaf8f9cb759efdbbeacffbfbe08
Author: Dan Stillman <dstillman@zotero.org>
Date:   Sat, 24 Jun 2017 19:24:52 -0400

Fix JS compiling in watch mode

Diffstat:
Mscripts/watch.js | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/scripts/watch.js b/scripts/watch.js @@ -1,7 +1,7 @@ const path = require('path'); const chokidar = require('chokidar'); const multimatch = require('multimatch'); -const { dirs, jsGlob, jsGlobIgnore, copyDirs, symlinkFiles } = require('./config'); +const { dirs, jsFiles, ignoreMask, copyDirs, symlinkFiles } = require('./config'); const { onSuccess, onError, getSignatures, writeSignatures, cleanUp, formatDirsForMatcher } = require('./utils'); const getJS = require('./js'); const getSass = require('./sass'); @@ -47,8 +47,8 @@ function getWatch() { let watcher = chokidar.watch(source, { cwd: ROOT }) .on('change', async (path) => { try { - if (multimatch(path, jsGlob).length && !multimatch(path, jsGlobIgnore).length) { - onSuccess(await getJS(path, { ignore: jsGlobIgnore }, signatures)); + if (multimatch(path, jsFiles).length && !multimatch(path, ignoreMask).length) { + onSuccess(await getJS(path, { ignore: ignoreMask }, signatures)); } else if (multimatch(path, 'scss/*.scss').length) { onSuccess(await getSass(path, {}, signatures)); } else if (multimatch(path, copyDirs.map(d => `${d}/**`)).length) {