Created
October 20, 2013 12:22
-
-
Save voxpelli/7068808 to your computer and use it in GitHub Desktop.
Basic gruntfile
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
/*jslint node: true, white: true, indent: 2 */ | |
"use strict"; | |
module.exports = function (grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
uglify: { | |
dist: { | |
files: { | |
'js/front.min.js': ['js/front.js'] | |
} | |
} | |
}, | |
jshint: { | |
// define the files to lint | |
files: [ | |
'Gruntfile.js' | |
, 'js/front.js' | |
], | |
// configure JSHint (documented at http://www.jshint.com/docs/) | |
options: { | |
laxcomma: true | |
} | |
}, | |
sass: { | |
dist: { | |
options : { | |
style : 'compressed' | |
}, | |
files: { | |
'styles/style.css': 'styles/style.scss' | |
} | |
} | |
}, | |
watch: { | |
js : { | |
files: ['<%= jshint.files %>'], | |
tasks: ['jshint', 'uglify'] | |
}, | |
sass : { | |
files: ['styles/*.scss'], | |
tasks: ['sass'], | |
options: { | |
livereload: true | |
} | |
} | |
} | |
}); | |
// Load the plugin that provides the "uglify" task. | |
grunt.loadNpmTasks('grunt-notify'); | |
grunt.loadNpmTasks('grunt-contrib-jshint'); | |
grunt.loadNpmTasks('grunt-contrib-uglify'); | |
grunt.loadNpmTasks('grunt-contrib-sass'); | |
grunt.loadNpmTasks('grunt-contrib-watch'); | |
// the default task can be run just by typing "grunt" on the command line | |
grunt.registerTask('default', ['jshint', 'uglify', 'sass']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment