Skip to content

Commit 51b3c17

Browse files
committed
improved reporting WRT watchDirs
now that `watchDir` are relative to `configDir` (cf. 0391305), reporting `rootDir` no longer seems sensible
1 parent 0391305 commit 51b3c17

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

bin/faucet

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ if(argv.help) {
3434
process.exit();
3535
}
3636

37-
let rootDir = process.cwd();
3837
let options = ["watch", "fingerprint", "compact"].reduce((memo, option) => {
3938
let value = argv[option];
4039
if(value !== undefined) {
@@ -43,13 +42,9 @@ let options = ["watch", "fingerprint", "compact"].reduce((memo, option) => {
4342
return memo;
4443
}, {});
4544

46-
if(options.watch) {
47-
console.error(`monitoring file system at ${rootDir}`);
48-
49-
if(options.fingerprint !== false) { // for convenience
50-
console.error("you might consider using `--no-fingerprint` to avoid " +
51-
"littering your file system with obsolete bundles");
52-
}
45+
if(options.watch && options.fingerprint !== false) { // for convenience
46+
console.error("you might consider using `--no-fingerprint` to avoid " +
47+
"littering your file system with obsolete bundles");
5348
}
5449

55-
start(rootDir, argv.config, options);
50+
start(process.cwd(), argv.config, options);

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ module.exports = (rootDir, config = "faucet.js", // eslint-disable-next-line ind
2222
watchDirs.map(dir => path.resolve(configDir, dir)) :
2323
[configDir];
2424
/* eslint-enable indent */
25+
26+
let separator = watchDirs.length === 1 ? " " : "\n";
27+
console.error("monitoring file system at" + separator +
28+
watchDirs.join(separator));
29+
2530
watcher = makeWatcher(watchDirs);
2631
}
2732

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "faucet-pipeline",
3-
"version": "0.11.2",
3+
"version": "0.11.3",
44
"description": "front-end asset pipeline",
55
"author": "FND",
66
"contributors": [

0 commit comments

Comments
 (0)