Crash when watching directory containing other files?
In a theme project that houses source code under /src
and uses scripts to build the theme files into place in templates
, blocks
and files
, thm watch
appears to crash when a change is made to one of the src
files. In this case, one named index.html
. Not sure why it's looking for a .json
version of the file at all, but it falls over at this point.
thm
should only monitor directories it expects to change, not the entire source tree. Better yet, for working nicely with build tools, it would be great if it would support blocks
, files
, templates
located in a dist
build target directory (and fall back to top-level directories to maintain support for simple projects.)
Error pasted below:
fs.js:583
return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
^
Error: ENOENT: no such file or directory, open '/Users/benward/Code/bffdotfm/src/html/pages/home/index.json'
at Object.fs.openSync (fs.js:583:18)
at Object.fs.readFileSync (fs.js:490:33)
at Object.prepareFormData (/usr/local/lib/node_modules/thm/lib/file-methods.js:149:30)
at Object.changed (/usr/local/lib/node_modules/thm/lib/file-methods.js:332:28)
at EventEmitter.<anonymous> (/usr/local/lib/node_modules/thm/lib/monitor.js:52:19)