Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Keep plugin working for grunt 0.3 #2

Merged
merged 1 commit into from

2 participants

@xbudex

grunt.utils was renamed to grunt.utils in 0.4. Using a fallback to maintain backwards compatibility. If grunt.util is not available, use grunt.utils.

@xbudex xbudex Allow backwards compatibility with grunt 0.3
grunt.utils was renamed to grunt.utils in 0.4. Using a fallback to
maintain backwards compatibility. If grunt.util is not avalible, use
grunt.utils.
257538b
@ericclemmons ericclemmons merged commit a80bbe1 into ericclemmons:master
@ericclemmons

Bumping to 0.1.3! thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 9, 2013
  1. @xbudex

    Allow backwards compatibility with grunt 0.3

    xbudex authored
    grunt.utils was renamed to grunt.utils in 0.4. Using a fallback to
    maintain backwards compatibility. If grunt.util is not avalible, use
    grunt.utils.
This page is out of date. Refresh to see the latest.
Showing with 3 additions and 1 deletion.
  1. +3 −1 tasks/livereload.js
View
4 tasks/livereload.js
@@ -44,6 +44,8 @@ module.exports = function(grunt) {
var config = grunt.config('livereload');
var files = grunt.file.expand(config.files);
var base = grunt.file.expand(config.options.base || '.')[0];
+ // utils was renamed to util with v0.4.0. Use fallback for backwards compatibility
+ var util = grunt.util || grunt.utils;
if (started) {
refresh();
@@ -51,7 +53,7 @@ module.exports = function(grunt) {
start();
gaze(files, function(err) {
- this.on('all', grunt.util._.debounce(function(event, filepath) {
+ this.on('all', util._.debounce(function(event, filepath) {
refresh(base, filepath);
}, 250));
});
Something went wrong with that request. Please try again.