Skip to content

Commit ecf078f

Browse files
author
Brian Muenzenmeyer
committed
Merge pull request #65 from pattern-lab/plnode1-5
Plnode1 5
2 parents fadde70 + 0da26a1 commit ecf078f

File tree

7 files changed

+16
-13
lines changed

7 files changed

+16
-13
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
THIS CHANGELOG IS AN ATTEMPT TO DOCUMENT CHANGES TO THIS PROJECT.
22

3+
PL-node-v0.1.5
4+
- ADD: Live reload support for grunt serve task
5+
- THX: thanks @marcinmodestowicz for the configuration fix. VERY useful :)
6+
37
PL-node-v0.1.4
48
- FIX: Resolved issue with nested pattern rendering
59
- FIX: Supporting flat pattern name regex's in unix-systems

Gruntfile.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ module.exports = function(grunt) {
5151
// tasks: ['default']
5252
// },
5353
all: {
54+
options: {
55+
livereload: true
56+
},
5457
files: [
5558
'source/_patterns/**/*.mustache',
5659
'source/_patterns/**/*.json',
@@ -81,7 +84,8 @@ module.exports = function(grunt) {
8184
port: 9001,
8285
base: './public',
8386
hostname: 'localhost',
84-
keepalive: true
87+
open: true,
88+
livereload: 35729
8589
}
8690
}
8791
}
@@ -99,9 +103,6 @@ module.exports = function(grunt) {
99103
//travis CI task
100104
grunt.registerTask('travis', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'nodeunit']);
101105

102-
grunt.registerTask('serve', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'connect:app']);
103-
//need to get livereload working
104-
//http://www.thecrumb.com/2014/03/16/using-grunt-for-live-reload-revisited/
105-
//http://rhumaric.com/2013/07/renewing-the-grunt-livereload-magic/
106+
grunt.registerTask('serve', ['clean', 'concat', 'patternlab', /*'sass',*/ 'copy', 'connect', 'watch']);
106107

107108
};

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,7 @@ Pattern states should be lowercase and use hyphens where spaces are present.
7676
```
7777

7878
##### Server
79-
Running `grunt serve` will compile the patternlab front end and host it on <a href="http://localhost:9001">http://localhost:9001</a> by default. This can be changed in the `Gruntfile.js`
80-
81-
**Next steps: Livereload and watches**
79+
Running `grunt serve` will compile the patternlab front end and host it on <a href="http://localhost:9001">http://localhost:9001</a> by default. Page will reload on any saved source code change.
8280

8381
### Under Active Development
8482

builder/object_factory.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* patternlab-node - v0.1.4 - 2014
2+
* patternlab-node - v0.1.5 - 2014
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

builder/patternlab.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* patternlab-node - v0.1.4 - 2014
2+
* patternlab-node - v0.1.5 - 2014
33
*
44
* Brian Muenzenmeyer, and the web community.
55
* Licensed under the MIT license.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "patternlab-node",
33
"description": "Pattern Lab is a collection of tools to help you create atomic design systems. This is the node command line interface (CLI).",
4-
"version": "0.1.4",
4+
"version": "0.1.5",
55
"devDependencies": {
66
"grunt": "~0.4.0",
7-
"grunt-contrib-watch": "~0.2.0",
7+
"grunt-contrib-watch": "~0.6.1",
88
"grunt-contrib-sass": "~0.2.2",
99
"grunt-contrib-copy": "~0.4.0",
1010
"grunt-contrib-jshint": "~0.4.0",

public/listeners/synclisteners.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ var wsnConnected = false;
1818
var wsc;
1919
var wscConnected = false;
2020
var dataPrevious = 0;
21-
var host = (window.location.host != "") ? window.location.host : "127.0.0.1";
21+
var host = (window.location.host !== '') ? window.location.hostname : '127.0.0.1';
2222

2323
// handle page updates from one browser to another
2424
function connectNavSync() {

0 commit comments

Comments
 (0)