Skip to content

Instantly share code, notes, and snippets.

@ferclaverino
Created August 2, 2013 14:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ferclaverino/6140461 to your computer and use it in GitHub Desktop.
Save ferclaverino/6140461 to your computer and use it in GitHub Desktop.
Integrate Travis CI + Grunt
language: node_js
node_js:
- 0.9
before_script:
- npm install -g grunt-cli
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']);
};
{
"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