Skip to content

Commit

Permalink
#29 fixed issue with grunt dev watching for changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
itayw committed Jun 17, 2015
1 parent ecf82e6 commit 5bb32ab
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 7 deletions.
36 changes: 30 additions & 6 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,38 @@ module.exports = function (grunt) {
}
}
},
watch: {
scripts: {
files: ['./src/**/*.js'],
tasks: ['dev'],
options: {
spawn: false
}
},
css: {
files: ['./src/**/*.css'],
tasks: ['css'],
options: {
spawn: false
}
}
},
watchify: {
options: {
keepalive: true,
verbose: true,
debug: true
debug: true,

callback: function (b) {
// configure the browserify instance here
b.add('./build/temp/vendor.js', {expose: 'Highcharts'});
b.require('./build/temp/vendor.js', {expose: 'Highcharts'});
// return it
return b;
}
},
all: {
src: ['./build/temp/vendor.js', './src/lib/index.js'],

src: ['./src/lib/index.js'],
dest: 'build/release/joola.js'
}
},
Expand Down Expand Up @@ -105,7 +128,7 @@ module.exports = function (grunt) {
cssmin: {
options: {
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %> */',
'<%= grunt.template.today("yyyy-mm-dd") %> */',
keepSpecialComments: 0
},
my_target: {
Expand Down Expand Up @@ -178,8 +201,9 @@ module.exports = function (grunt) {
grunt.loadNpmTasks(key);
}

grunt.registerTask('default', [ 'clean', 'http', 'jshint', 'browserify', 'concat', 'uglify', 'cssmin', 'copy']); //'csslint',
grunt.registerTask('dev', ['connect', 'watchify']);
grunt.registerTask('default', ['clean', 'http', 'jshint', 'browserify', 'concat', 'uglify', 'cssmin', 'copy']); //'csslint',
grunt.registerTask('dev', ['short', 'watch']);
grunt.registerTask('short', ['browserify', 'concat', 'copy']);
grunt.registerTask('css', ['concat', 'cssmin', 'copy']); //'csslint',
grunt.registerTask('test', ['default', 'connect', 'mocha']);
grunt.registerTask('test:bare', ['connect', 'mocha']);
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "joola.sdk",
"preferGlobal": false,
"version": "0.8.6-develop",
"version": "0.8.7-develop",
"author": "Joola <[email protected]>",
"description": "joola's software development kit (SDK)",
"engine": "node >= 0.10.x",
Expand Down Expand Up @@ -53,6 +53,7 @@
"grunt-contrib-copy": "~0.5.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-uglify": "~0.4.0",
"grunt-contrib-watch": "^0.6.1",
"grunt-css": "~0.5.4",
"grunt-http": "^1.4.2",
"grunt-mocha": "~0.4.10",
Expand Down

0 comments on commit 5bb32ab

Please sign in to comment.