a basic gruntfile with compass, jshint, and jasmine
/*global module: false */ | |
module.exports = function(grunt) { | |
"use strict"; | |
grunt.initConfig({ | |
compass: { | |
dist: { | |
options: { | |
sassDir: 'sass', | |
cssDir: 'css' | |
} | |
} | |
}, | |
jshint: { | |
options: { | |
jshintrc: '.jshintrc' | |
}, | |
dist: { | |
src: ['Gruntfile.js', 'js/main.js'] | |
} | |
}, | |
watch: { | |
files: 'sass/*', | |
tasks: ['sass'] | |
}, | |
jasmine: { | |
tests: { | |
src: 'js/main.js', | |
options: { | |
specs: 'spec/*_spec.js', | |
vendor: ['js/vendor/jquery-1.8.2.js', 'js/vendor/jquery-ui-1.10.2.custom.js'] | |
} | |
} | |
}, | |
connect: { | |
test: { | |
options: { | |
port: 9001, | |
keepalive: true | |
} | |
} | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-compass'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
grunt.loadNpmTasks('grunt-contrib-jasmine'); | |
grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.registerTask('lint', 'jshint'); | |
grunt.registerTask('sass', 'compass'); | |
grunt.registerTask('test', ["jasmine:tests:build", "connect:test"]); | |
grunt.registerTask('default', ['lint', 'sass', 'test']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment