Skip to content

Commit f2d8642

Browse files
committed
added support for watchDirs whitelist
this is mainly required to avoid ENOSPC errors on Linux due to inotify's default watch limit
1 parent 486b9d0 commit f2d8642

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

index.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,16 @@ module.exports = (rootDir, config = "faucet.js", // eslint-disable-next-line ind
1414
let configDir = path.dirname(configPath);
1515
config = require(configPath);
1616

17-
let watcher = watch && makeWatcher(rootDir);
17+
let watcher;
18+
if(watch) {
19+
let { watchDirs } = config;
20+
/* eslint-disable indent */
21+
watchDirs = watchDirs ?
22+
watchDirs.map(dir => path.resolve(rootDir, dir)) :
23+
[rootDir];
24+
/* eslint-enable indent */
25+
watcher = makeWatcher(watchDirs);
26+
}
1827

1928
Object.keys(PLUGINS).forEach(type => {
2029
let cfg = config[type];

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline",
3-
"version": "0.11.1",
3+
"version": "0.11.2",
44
"description": "front-end asset pipeline",
55
"author": "FND",
66
"contributors": [
@@ -24,11 +24,11 @@
2424
},
2525
"dependencies": {
2626
"minimist": "^1.2.0",
27-
"nite-owl": "^3.0.0"
27+
"nite-owl": "^3.1.0"
2828
},
2929
"devDependencies": {
30-
"eslint": "^4.3.0",
31-
"eslint-config-fnd": "^1.1.1",
32-
"release-util-fnd": "^1.0.0"
30+
"eslint": "^4.4.1",
31+
"eslint-config-fnd": "^1.2.0",
32+
"release-util-fnd": "^1.0.4"
3333
}
3434
}

0 commit comments

Comments
 (0)