Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

Tweak options for sane library #1460

Merged
merged 4 commits into from
Nov 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions packages/truffle-core/lib/commands/watch.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const colors = require("colors");
const commandExistsSync = require("command-exists").sync;

const command = {
command: "watch",
Expand All @@ -22,6 +23,16 @@ const command = {
/[\/\\]\./ // Ignore files prefixed with .
]
};
// Certain large codebases have trouble with the watch command.
// Installing watchman resolves some of these issues.
if (commandExistsSync("watchman")) {
watchOptions.watchman = true;
} else {
config.logger.log(
"If you have trouble using watch, try installing watchman."
);
}

const watchCallback = filePath => {
const displayPath = path.join(
"./",
Expand Down
1 change: 1 addition & 0 deletions packages/truffle-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"async": "2.6.1",
"chai": "4.1.2",
"colors": "^1.1.2",
"command-exists": "^1.2.8",
"configstore": "^4.0.0",
"cpr": "^0.4.3",
"debug": "^3.1.0",
Expand Down