From 07ac2a372f14a3a06e3da5942a9eedd2972a1f72 Mon Sep 17 00:00:00 2001 From: Kushan Joshi <0o3ko0@gmail.com> Date: Mon, 25 Sep 2017 17:35:04 +0530 Subject: [PATCH] Ignore the output files of buildData.js --- development_server.js | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) diff --git a/development_server.js b/development_server.js index 04d51073d..42f913506 100644 --- a/development_server.js +++ b/development_server.js @@ -22,11 +22,25 @@ if (isDevelopment) { }); }); - gaze(['data/**/*.{js,json}'], function(err, watcher) { - watcher.on('all', function() { - buildData(); - }); - }); + gaze( + [ + 'data/**/*.{js,json}', + // ignore the output files of `buildData` + '!data/presets/categories.json', + '!data/presets/fields.json', + '!data/presets/presets.json', + '!data/presets.yaml', + '!data/taginfo.json', + '!dist/locales/en.json' + ], + function(err, watcher) { + watcher.on('all', function() { + buildData(); + // need to recompute js files when data changes + buildSrc(); + }); + } + ); gaze(['modules/**/*.js'], function(err, watcher) { watcher.on('all', function() {