Skip to content

Commit

Permalink
Setup for live-reload
Browse files Browse the repository at this point in the history
Added live-reload and parallel watch tasks.
  • Loading branch information
johnholland-nice committed Jul 21, 2016
1 parent 95b50b9 commit 90e21c0
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
23 changes: 23 additions & 0 deletions .grunt-tasks/parallel.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
options: {
stream: true
},
watch: {
tasks: [{
grunt: true,
args: ["watch:sass"]
}, {
grunt: true,
args: ["watch:eslint"]
}, {
grunt: true,
args: ["watch:jsbuild"]
}, {
grunt: true,
args: ["watch:express"]
}, {
grunt: true,
args: ["watch:public"]
}]
},
}
6 changes: 6 additions & 0 deletions .grunt-tasks/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,11 @@ module.exports = {
options: {
spawn: false
}
},
public: {
files: ["./dist/stylesheets/**/*.css", "./dist/javascripts/**/*.js", "./web/server/views/**/*.njk"],
options: {
livereload: true
}
}
}
2 changes: 1 addition & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ module.exports = function(grunt) {
r("lint", ["sasslint", "eslint"]);
r("docs", ["sassdoc", "documentation"]);
r("build", ["sass", "webpack"]);
r("serve", ["express", "open", "watch"]);
r("serve", ["express", "open", "parallel:watch"]);

r("default", ["lint", "docs", "build", "serve"]);
};

0 comments on commit 90e21c0

Please sign in to comment.