Skip to content

Commit

Permalink
Add coveralls and readme badges
Browse files Browse the repository at this point in the history
  • Loading branch information
beck committed Mar 6, 2014
1 parent b0946cd commit b28e5ca
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 11 deletions.
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ tmp

# generated test data
test/fixtures/app/i18n
/coverage/
/coverage.html
coverage
coverage.html
lcov.info
30 changes: 23 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,36 @@ module.exports = function(grunt) {
},

mochaTest: {
test: {
'spec': {
options: {
reporter: 'spec',
},
src: ['coverage/test/**/*.js']
},
coverage: {
'html-cov': {
options: {
reporter: 'html-cov',
quiet: true,
captureFile: 'coverage.html'
},
src: ['coverage/test/**/*.js']
},
'mocha-lcov-reporter': {
options: {
reporter: 'mocha-lcov-reporter',
quiet: true,
captureFile: 'lcov.info'
},
src: ['coverage/test/**/*.js']
}
},

coveralls: {
options: {
force: true
},
all: {
src: 'lcov.info'
}
},

Expand Down Expand Up @@ -99,14 +116,13 @@ module.exports = function(grunt) {

// Actually load this plugin's task(s).
grunt.loadTasks('tasks');

// helper task for creating fixture locale
grunt.registerTask('makemessages', ['xgettext', 'abideCreate']);

grunt.registerTask('unitTest', [
grunt.registerTask('default', [
'clean', 'clean', 'statici18n', 'blanket', 'copy', 'mochaTest'
]);

// 'test' is for travis, 'default' is for local
grunt.registerTask('test', ['jshint', 'unitTest']);
grunt.registerTask('default', 'unitTest');
grunt.registerTask('ci', ['jshint', 'default', 'coveralls']);

};
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Static Internationalization

[![Build Status](https://api.travis-ci.org/beck/grunt-static-i18n.png)](https://travis-ci.org/beck/grunt-static-i18n)
[![Coverage Status](https://coveralls.io/repos/beck/grunt-static-i18n/badge.png)](https://coveralls.io/r/beck/grunt-static-i18n)

> Grunt plugin to translate static assets.
Say you have:
Expand Down
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,11 @@
"sinon": "1.8.x",
"grunt-contrib-copy": "~0.5.0",
"grunt-blanket": "0.0.8",
"grunt-mocha-test": "~0.9.4"
"grunt-mocha-test": "~0.9.4",
"mocha-lcov-reporter": "0.0.1",
"grunt-coveralls": "~0.3.0"
},
"scripts": {
"test": "grunt test"
"test": "grunt ci"
}
}

0 comments on commit b28e5ca

Please sign in to comment.