Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

finishing up changes to Live Reload

  • Loading branch information...
commit 7e00d46c13339b1c92d1d995e9406c7758907305 1 parent 77d2230
Owen Barnes authored
View
9 doc/guide/en/live_reload.md
@@ -15,6 +15,15 @@ As you typically would in `production` mode.
### Known issues
+#### VIM
+
+VIM creates a temporary file before replacing the real file. To prevent problems with Live Reload, change the write mode with:
+
+ :set nowritebackup
+
+
+#### Too many files
+
Live Reload is built on Node's `fs.watch()` API which works differently on each operating system. For example, on Linux you'll get an `EMFILE` error if you have many files in your `client` directory. Change this limit with:
sudo vi /etc/sysctl.conf
View
1  lib/client/live_reload.js
@@ -50,7 +50,6 @@ module.exports = function(ss, options) {
var action, _ref;
action = (_ref = pathlib.extname(path), __indexOf.call(cssExtensions, _ref) >= 0) ? 'updateCSS' : 'reload';
if ((Date.now() - lastRun[action]) > 1000) {
- console.log(''.green, ("File " + event + ": " + path).grey);
console.log(''.green, consoleMessage[action].grey);
ss.publish.all('__ss:' + action);
return lastRun[action] = Date.now();
View
3  package.json
@@ -15,7 +15,8 @@
"nponeccop",
"Gilbert B Garza",
"Craig Jordan Muir",
- "David Rosen"
+ "David Rosen",
+ "Michael Lawson"
],
"dependencies": {
"colors": "= 0.6.0-1",
View
1  src/client/live_reload.coffee
@@ -31,7 +31,6 @@ module.exports = (ss, options) ->
onChange = (path, event) ->
action = if pathlib.extname(path) in cssExtensions then 'updateCSS' else 'reload'
if (Date.now() - lastRun[action]) > 1000 # Reload browser max once per second
- console.log(''.green, "File #{event}: #{path}".grey);
console.log(''.green, consoleMessage[action].grey)
ss.publish.all('__ss:' + action)
lastRun[action] = Date.now()
Please sign in to comment.
Something went wrong with that request. Please try again.