Adds grunt-notify. Adds 'coverage' task to open the coverage dir in the browser.
This commit is contained in:
parent
ce53362fbb
commit
4e8979c8e0
2 changed files with 37 additions and 14 deletions
50
Gruntfile.js
50
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'
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -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",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue