Skip to content

Commit

Permalink
Ignore temporary and backup files while watching for changes
Browse files Browse the repository at this point in the history
  • Loading branch information
gagern authored and montaga committed May 30, 2018
1 parent 3a0a7d3 commit 975d1fd
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions make/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ var chalk = require("chalk");
var chokidar = require("chokidar");
var browserSync = require("browser-sync");

// The following files will not trigger a reload
var exclude = [
"!**/.*", // hidden file, perhaps an editor lock or some such
"!**/*~", // backup file, created by some editors
"!**/#*#", // Emacs creates these for unsaved edits
];

// The following files and directories will trigger a build & reload
var watchToBuild = [
"images",
Expand All @@ -22,13 +29,13 @@ var watchToBuild = [
"src",
"tests",
"tools",
];
].concat(exclude);

// The following directories will trigger a reload only
var watchToReload = [
"examples",
"private_examples",
];
].concat(exclude);

var ignored = [
"**/.*", // hidden files, e.g. lock files or similar
Expand Down

0 comments on commit 975d1fd

Please sign in to comment.