M-Zuber / npm-watch

run npm scripts when files change
MIT License
324 stars 38 forks source link

triggered only when new files are creaeted not on modify #60

Closed cancerberoSgx closed 5 years ago

cancerberoSgx commented 5 years ago

I'm on linux, and this does't work, It's only triggered when new files are created but not when existing files change. tried both with

"watch": {
    "build": "src/*.ts"
  },

and with

"watch": {
    "build": {
      "patterns": ["src"],
      "extensions": "ts",
      "quiet": false,
      "legacyWatch": true,
      "runOnChangeOnly": false
    }
  },

Note that in the readme with cat you are always replacing the file because you use > and not mofifying it (that would be using >>...