Skip to content

Commit

Permalink
update Gruntfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
mohayonao committed Mar 21, 2014
1 parent 5481dc5 commit 8c729de
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,10 @@ module.exports = function(grunt) {
pkg: grunt.file.readJSON("./package.json")
});

grunt.registerTask("default", function() {
loadNpmTasksIfNeeded("grunt-contrib-connect");
loadNpmTasksIfNeeded("grunt-este-watch");
grunt.registerTask("default", [ "connect", "watch" ]);

grunt.config.data.esteWatch = {
options: {
dirs: [ "src/**/", "bin/", "demo/" ]
},
js: function(file) {
return [ "check:" + file ];
}
};
grunt.registerTask("connect", function() {
loadNpmTasksIfNeeded("grunt-contrib-connect");

grunt.config.data.connect = {
server: {
Expand All @@ -54,6 +46,20 @@ module.exports = function(grunt) {
};

grunt.task.run("connect");
});

grunt.registerTask("watch", function() {
loadNpmTasksIfNeeded("grunt-este-watch");

grunt.config.data.esteWatch = {
options: {
dirs: [ "src/**/", "bin/", "demo/" ]
},
js: function(file) {
return [ "check:" + file ];
}
};

grunt.task.run("esteWatch");
});

Expand Down

0 comments on commit 8c729de

Please sign in to comment.