Skip to content

Commit

Permalink
tooling: add seperate file-reader watch
Browse files Browse the repository at this point in the history
to avoid double-reload on dev-server and speed up re-build
  • Loading branch information
Michael Mrowetz committed Feb 6, 2017
1 parent 36d2d2d commit 6abc417
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
14 changes: 11 additions & 3 deletions build-utils/grunt-config/watch.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@
module.exports = {
ts: {
files: ["src/ts/**/*.ts", "Gruntfile.js"],
tasks: ["distBase"],
ts: { // all ts except the file reader ones (to avoid double-reload)
files: ["src/ts/**/*.ts", "!src/ts/file-reader.ts"],
tasks: ["browserify:dist"],
options: {
spawn: false,
interrupt: true
},
},
fileReader: { //handle file-reader builds
files: ["src/ts/file-reader.ts", "src/zip/*.js"],
tasks: ["distFileReader"],
options: {
spawn: false,
interrupt: true
Expand Down
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"lint": "grunt tslint",
"watch": "npm run start & grunt default",
"build": "grunt releaseBuild",
"start": "live-server --wait=50 --open=src/index.html --ignore=src/ts/",
"start": "live-server --watch=build/stage/,src/index.html --ignore=build/stage/temp/ --open=src/index.html",
"clearJS": "find ./src/ts -iname \"*.js\" -delete && find ./src/ts -iname \"*.map\" -delete",
"ghPages": "grunt ghPages",
"release-patch": "grunt release",
Expand Down Expand Up @@ -48,8 +48,8 @@
"grunt-tslint": "^4.0.0",
"live-server": "^1.2.0",
"load-grunt-config": "^0.19.2",
"tsify": "^3.0.0",
"tslint": "^4.3.1",
"tsify": "^3.0.1",
"tslint": "^4.4.2",
"typescript": "^2.1.5"
}
}

0 comments on commit 6abc417

Please sign in to comment.