Last active
December 14, 2015 09:38
-
-
Save jdewit/5066131 to your computer and use it in GitHub Desktop.
Gruntfile.js
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'; | |
var path = require('path'), | |
lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet, | |
folderMount = function folderMount(connect, point) { | |
return connect.static(path.resolve(point)); | |
}; | |
module.exports = function(grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
pkg: grunt.file.readJSON('package.json'), | |
connect: { | |
uses_defaults: {} | |
}, | |
livereload: { | |
options: { | |
middleware: function(connect, options) { | |
return [lrSnippet, folderMount(connect, '.')] | |
} | |
} | |
}, | |
recess: { | |
dist: { | |
options: { | |
compile: true | |
}, | |
files: { | |
'web/css/style.css': [ | |
'web/less/dev/bootstrap.less' | |
] | |
} | |
}, | |
regarde: { | |
less: { | |
files: 'web/less/dev/*.less', | |
tasks: ['recess', 'livereload'] | |
} | |
}); | |
grunt.loadNpmTasks('grunt-contrib-livereload'); | |
grunt.loadNpmTasks('grunt-recess'); | |
grunt.loadNpmTasks('grunt-regarde'); | |
grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.registerTask('default', ['livereload-start', 'connect', 'regarde']); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment