Skip to content

Instantly share code, notes, and snippets.

@evandavis
Created May 15, 2013 19:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save evandavis/5586653 to your computer and use it in GitHub Desktop.
Save evandavis/5586653 to your computer and use it in GitHub Desktop.
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