Fixed the issue with watching under Win10 with Cygwin (#356)

This commit is contained in:
Eduard Kyvenko
2016-09-12 08:58:47 +02:00
committed by typicode
parent 459ddf5834
commit 2879dceec2

View File

@ -168,7 +168,7 @@ module.exports = function (argv) {
chokidar chokidar
.watch(path.dirname(source)) .watch(path.dirname(source))
.on('change', function (file) { .on('change', function (file) {
if (file === source) { if (path.resolve(file) === path.resolve(source)) {
if (is.JSON(file)) { if (is.JSON(file)) {
var obj = JSON.parse(fs.readFileSync(file)) var obj = JSON.parse(fs.readFileSync(file))
// Compare .json file content with in memory database // Compare .json file content with in memory database