Skip to content

Commit

Permalink
2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
shakyShane committed Feb 10, 2015
1 parent bb8e63b commit cdfdcfa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# grunt-browser-sync [![Build Status](https://travis-ci.org/shakyShane/grunt-browser-sync.svg?branch=master)](https://travis-ci.org/shakyShane/grunt-browser-sync) [![NPM version](https://badge.fury.io/js/grunt-browser-sync.png)](http://badge.fury.io/js/grunt-browser-sync)
# grunt-browser-sync [![NPM version](https://badge.fury.io/js/grunt-browser-sync.png)](http://badge.fury.io/js/grunt-browser-sync)

> A grunt task for the [browser-sync](https://github.com/shakyShane/browser-sync) module.
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "grunt-browser-sync",
"description": "Live CSS reload & Browser Syncing",
"version": "1.9.1",
"version": "2.0.0",
"homepage": "https://github.com/shakyshane/grunt-browser-sync",
"author": {
"name": "Shane Osbourne"
Expand All @@ -24,10 +24,10 @@
"node": ">= 0.8.0"
},
"scripts": {
"test": "mocha"
"test": "jshint tasks/*.js"
},
"dependencies": {
"browser-sync": "^1.9.1"
"browser-sync": "^2.0.1"
},
"keywords": [
"gruntplugin",
Expand All @@ -43,6 +43,7 @@
"grunt-contrib-connect": "~0.5.0",
"grunt-contrib-sass": "~0.6.0",
"grunt-contrib-watch": "~0.5.3",
"jshint": "^2.6.0",
"mocha": "^2.0.1"
}
}
17 changes: 8 additions & 9 deletions tasks/browser-sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,13 @@ module.exports = function (grunt) {

var browserSync = require("browser-sync");

browserSync(patterns, options);

if (options.watchTask || options.watchtask || options.background || !options.keepalive) {

// Wait until BrowserSync fully initializes
browserSync.emitter.on('service:running', function() {
done(); // Allow watch task to run after
});
}
browserSync(patterns, options, function () {
if (options.watchTask ||
options.watchtask ||
options.background ||
!options.keepalive) {
done();
}
});
});
};

0 comments on commit cdfdcfa

Please sign in to comment.