diff --git a/CHANGELOG b/CHANGELOG
index 8737c945a..7bda5d022 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,5 +1,9 @@
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.
+PL-node-v0.1.5
+ - ADD: Live reload support for grunt serve task
+ - THX: thanks @marcinmodestowicz for the configuration fix. VERY useful :)
+
PL-node-v0.1.4
- FIX: Resolved issue with nested pattern rendering
- FIX: Supporting flat pattern name regex's in unix-systems
diff --git a/Gruntfile.js b/Gruntfile.js
index 0a9791dd4..93730ab67 100644
--- a/Gruntfile.js
+++ b/Gruntfile.js
@@ -51,6 +51,9 @@ module.exports = function(grunt) {
// tasks: ['default']
// },
all: {
+ options: {
+ livereload: true
+ },
files: [
'source/_patterns/**/*.mustache',
'source/_patterns/**/*.json',
@@ -81,7 +84,8 @@ module.exports = function(grunt) {
port: 9001,
base: './public',
hostname: 'localhost',
- keepalive: true
+ open: true,
+ livereload: 35729
}
}
}
@@ -99,9 +103,6 @@ module.exports = function(grunt) {
//travis CI task
grunt.registerTask('travis', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'nodeunit']);
- grunt.registerTask('serve', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'connect:app']);
- //need to get livereload working
- //http://www.thecrumb.com/2014/03/16/using-grunt-for-live-reload-revisited/
- //http://rhumaric.com/2013/07/renewing-the-grunt-livereload-magic/
+ grunt.registerTask('serve', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'connect', 'watch']);
};
\ No newline at end of file
diff --git a/README.md b/README.md
index a738715e7..920b92371 100644
--- a/README.md
+++ b/README.md
@@ -76,9 +76,7 @@ Pattern states should be lowercase and use hyphens where spaces are present.
```
##### Server
-Running `grunt serve` will compile the patternlab front end and host it on http://localhost:9001 by default. This can be changed in the `Gruntfile.js`
-
-**Next steps: Livereload and watches**
+Running `grunt serve` will compile the patternlab front end and host it on http://localhost:9001 by default. Page will reload on any saved source code change.
### Under Active Development
diff --git a/builder/object_factory.js b/builder/object_factory.js
index ab95fafc5..519f44869 100644
--- a/builder/object_factory.js
+++ b/builder/object_factory.js
@@ -1,5 +1,5 @@
/*
- * patternlab-node - v0.1.4 - 2014
+ * patternlab-node - v0.1.5 - 2014
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
diff --git a/builder/patternlab.js b/builder/patternlab.js
index bee0e2faa..dc7061457 100644
--- a/builder/patternlab.js
+++ b/builder/patternlab.js
@@ -1,5 +1,5 @@
/*
- * patternlab-node - v0.1.4 - 2014
+ * patternlab-node - v0.1.5 - 2014
*
* Brian Muenzenmeyer, and the web community.
* Licensed under the MIT license.
diff --git a/package.json b/package.json
index 57f9cf18e..278f787eb 100644
--- a/package.json
+++ b/package.json
@@ -1,10 +1,10 @@
{
"name": "patternlab-node",
"description": "Pattern Lab is a collection of tools to help you create atomic design systems. This is the node command line interface (CLI).",
- "version": "0.1.4",
+ "version": "0.1.5",
"devDependencies": {
"grunt": "~0.4.0",
- "grunt-contrib-watch": "~0.2.0",
+ "grunt-contrib-watch": "~0.6.1",
"grunt-contrib-sass": "~0.2.2",
"grunt-contrib-copy": "~0.4.0",
"grunt-contrib-jshint": "~0.4.0",
diff --git a/public/listeners/synclisteners.js b/public/listeners/synclisteners.js
index a76ee4921..e0eca083c 100644
--- a/public/listeners/synclisteners.js
+++ b/public/listeners/synclisteners.js
@@ -18,7 +18,7 @@ var wsnConnected = false;
var wsc;
var wscConnected = false;
var dataPrevious = 0;
-var host = (window.location.host != "") ? window.location.host : "127.0.0.1";
+var host = (window.location.host !== '') ? window.location.hostname : '127.0.0.1';
// handle page updates from one browser to another
function connectNavSync() {