Created
January 24, 2013 05:44
-
-
Save sleeper/4617978 to your computer and use it in GitHub Desktop.
This file contains 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 connect = require('connect'); | |
var path = require('path'); | |
var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet; | |
var folderMount = function folderMount(point) { | |
return connect.static(path.resolve(point)); | |
}; | |
module.exports = function (grunt) { | |
// Project configuration. | |
grunt.initConfig({ | |
connect: { | |
livereload: { | |
options: { | |
port: 9001, | |
middleware: function() { | |
return [lrSnippet, folderMount('.')] | |
} | |
} | |
} | |
}, | |
// Configuration to be run (and then tested). | |
regarde: { | |
fred: { | |
files: '*.txt', | |
tasks: ['livereload'] | |
} | |
} | |
}); | |
// Actually load this plugin's task(s). | |
grunt.loadTasks('../tasks'); | |
grunt.loadNpmTasks('grunt-regarde'); | |
grunt.loadNpmTasks('grunt-contrib-connect'); | |
grunt.loadNpmTasks('grunt-contrib-livereload'); | |
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