Created
May 14, 2014 19:20
-
-
Save andrewmartin/b9104e2d8bd7f15475d2 to your computer and use it in GitHub Desktop.
grunt-less-bootup
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
'use strict' | |
module.exports = (grunt) -> | |
path = require('path') | |
# load all grunt tasks | |
require('matchdep').filterDev('grunt-*').forEach grunt.loadNpmTasks | |
require('time-grunt')(grunt) | |
# config | |
grunt.initConfig | |
watch: | |
options: | |
livereload: false | |
spawn: false | |
less: | |
files: ['src/stylesheets/**/*.less'] | |
tasks: ['less'] | |
coffee: | |
files: ['src/scripts/**/*.coffee'] | |
tasks: ['coffee'] | |
less: | |
dashboard: | |
files: | |
'dist/css/application.css': 'src/stylesheets/application.less' | |
options: | |
cleancss: true | |
sourceMap: true | |
coffee: | |
dev: | |
options: | |
sourceMap: true | |
expand: true | |
cwd: 'src/scripts' | |
src: '**/*.coffee' | |
dest: 'dist/scripts' | |
ext: '.js' | |
# minification and beautification tasks | |
# minify and compress css | |
cssmin: | |
options: | |
report: 'min' | |
banner: '/* minified via grunt task. Check Gruntfile.coffee for more info. */' | |
app: | |
files: 'dist/css/application.min.css': 'dist/css/application.css' | |
grunt.registerTask('default', ['coffee', 'less', 'watch']) | |
grunt.registerTask('build', ['less', 'cssmin']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment