diff --git a/Gruntfile.js b/Gruntfile.js index da07187..a69a24b 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -86,18 +86,26 @@ module.exports = function (grunt) { } }, test: { - options: { - port: 9001, - middleware: function (connect) { - return [ - connect().use( - '/bower_components', - connect.static('./bower_components') - ), - connect.static(appConfig.app) - ]; + options: { + port: 9001, + middleware: function (connect) { + return [ + connect().use( + '/bower_components', + connect.static('./bower_components') + ), + connect.static(appConfig.app) + ]; + } + } + }, + coverage: { + options: { + open: true, + port: 9003, + keepalive: true, + base: './coverage/' } - } }, dist: { options: { @@ -121,7 +129,7 @@ module.exports = function (grunt) { continuous: { singleRun: false, background: true, - browsers: ['PhantomJS'], + browsers: ['Chrome'], reporters: ['progress', 'growl'] } }, @@ -348,8 +356,16 @@ module.exports = function (grunt) { createDirectories: true } } - } + }, + // Display notfifications when builds complete using Growl + notify: { + deploy: { + options: { + message: 'Jamstash deployed to test server' + } + } + } }); grunt.registerTask('serve', 'Compile then start a connect web server', function (target) { @@ -370,6 +386,11 @@ module.exports = function (grunt) { 'jshint' ]); + grunt.registerTask('coverage', [ + 'karma:unit', + 'connect:coverage' + ]); + grunt.registerTask('build', [ 'clean:dist', 'wiredep:app', @@ -389,7 +410,8 @@ module.exports = function (grunt) { return grunt.task.run([ 'build', 'sshexec:cleanTest', - 'sftp:test' + 'sftp:test', + 'notify:deploy' ]); }); diff --git a/package.json b/package.json index 4cd3ade..51bac84 100644 --- a/package.json +++ b/package.json @@ -42,6 +42,7 @@ "grunt-filerev": "^2.1.1", "grunt-karma": "^0.9.0", "grunt-ng-annotate": "^0.5.0", + "grunt-notify": "^0.4.1", "grunt-ssh": "^0.12.0", "grunt-usemin": "^2.6.0", "grunt-wiredep": "^1.9.0",