Created
August 2, 2013 14:51
-
-
Save ferclaverino/6140461 to your computer and use it in GitHub Desktop.
Integrate Travis CI + Grunt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
language: node_js | |
node_js: | |
- 0.9 | |
before_script: | |
- npm install -g grunt-cli |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function(grunt) { | |
// Project configuration. | |
// | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
jshint: { | |
all: ['Gruntfile.js', 'web/static/test/*.js', 'web/static/js/**/*.js'], | |
}, | |
qunit: { | |
all: ['web/static/test/test.html'] | |
}, | |
}); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-qunit'); | |
// Add a default task. This is optional, of course :) | |
grunt.registerTask('default', ['jshint', 'qunit']); | |
// Travis CI task. | |
grunt.registerTask('travis', ['jshint']); | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "my-project-name", | |
"version": "0.1.0", | |
"devDependencies": { | |
"grunt": "~0.4.1", | |
"grunt-contrib-jshint": "~0.6.0", | |
"grunt-contrib-nodeunit": "~0.2.0", | |
"grunt-contrib-uglify": "~0.2.2", | |
"grunt-contrib-qunit": "~0.2.2" | |
}, | |
"scripts": { | |
"test": "grunt travis --verbose" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment