Created
November 19, 2013 01:00
-
-
Save alexshive/7538348 to your computer and use it in GitHub Desktop.
Grunt boilerplate
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*/ | |
| 'use strict'; | |
| module.exports = function(grunt){ | |
| grunt.initConfig({ | |
| compass: { | |
| global: { | |
| options: { | |
| sassDir: 'sass', | |
| cssDir: 'css', | |
| force: true, | |
| outputStyle: 'compressed' // nested, expanded, compact, compressed | |
| } | |
| } | |
| }, | |
| watch: { | |
| files: [ | |
| 'sass/**', | |
| 'js/*.js' | |
| ], | |
| tasks: ['compass', 'uglify'] | |
| }, | |
| uglify: { | |
| options: { | |
| compress: { | |
| global_defs: { | |
| "DEBUG": false | |
| }, | |
| dead_code: true | |
| } | |
| }, | |
| my_target: { | |
| files: { | |
| 'js/minified.js': | |
| [ | |
| 'js/file1.js', | |
| 'js/file2.js'] | |
| } | |
| } | |
| } | |
| }); | |
| grunt.loadNpmTasks('grunt-contrib-compass'); | |
| grunt.loadNpmTasks('grunt-contrib-watch'); | |
| grunt.loadNpmTasks('grunt-contrib-uglify'); | |
| grunt.registerTask('default', ['compass']); | |
| } | |
| // To run enter the following in terminal while in the project directory | |
| // $ grunt watch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment