Use tsify instead of tsc --watch

ts --watch currenly writes all files after a change. This is not good
because a server always reboots after a change in client, and vice-versa
This commit is contained in:
Jerko Steiner 2019-11-15 19:58:44 -03:00
parent 4c28775b12
commit 46f639021e

View File

@ -10,15 +10,15 @@
},
"scripts": {
"start": "node lib/index.js",
"start:server": "nodemon --ignore build/ --ignore lib/client",
"start:watch": "npm run ts && chastifol [ npm run ts:watch ] [ npm run js:watch ] [ npm run css:watch ] [ npm run start:server ]",
"start:server": "nodemon -e ts,tsx --ignore src/client -x ts-node src/index.ts",
"start:watch": "chastifol [ npm run js:watch ] [ npm run css:watch ] [ npm run start:server ]",
"prepublishOnly": "npm run build",
"build": "npm run css && npm run ts && npm run js && npm run js:uglify",
"test": "jest",
"test:coverage": "jest --coverage",
"test:watch": "jest --watch",
"js": "browserify -g [ loose-envify purge --NODE_ENV production ] -t babelify ./lib/client/index.js -o ./build/index.prod.js",
"js:watch": "watchify ./lib/client/index.js -v -d -o ./build/index.js",
"js:watch": "watchify -p tsify ./src/client/index.tsx -v -d -o ./build/index.js",
"js:uglify": "minify build/index.prod.js -o build/index.js",
"css": "node-sass ./src/scss/style.scss -o ./build/",
"css:watch": "npm run css && node-sass --watch ./src/scss/style.scss -o ./build/",