vrudikov / typescript-rest-boilerplate

Boilerplate project for awesome typescript-rest(https://github.com/thiagobustamante/typescript-rest) library
MIT License
81 stars 45 forks source link

Nodemon ts file changes with rebuilding swagger files #16

Open mstfash opened 4 years ago

mstfash commented 4 years ago

Hi,

Could you tell me how to nodemon watch ts files changes as well as running npm run swagger with each change so the apis are always auto generated?

Thanks

evelyne24 commented 4 years ago

I use this in my package.json:

"scripts": {
    "build": "npm run clean && tsc && npm run swagger",
    "dev": "tsc-watch --onSuccess 'npm run swagger' --onFirstSuccess 'npm run dev-server' | bunyan",
    "dev-server": "node-dev dist/index.js",
}