script, , npm-watch: https://www.npmjs.com/package/npm-watch.
, , . :
npm-watch :
$ npm install npm-watch --save-dev
package.json :
"watch": {
"lint": "src/main.ts"
},
"scripts": {
"lint": "tslint src/**/*.ts -t verbose",
"watch": "npm-watch"
},
, npm-watch - , , tslint.
Update:
, "" package.json, , , chokidar. , .
package.json:
"scripts": {
"lint:watch": "chokidar webpack.config.* src/**/*.ts buildScripts/**/*.ts -c \"npm run lint\" --initial --verbose"
},
, -c, , , - .
, :
$ npm run lint:watch
-initial, - .