GithubHelp home page GithubHelp logo

auto-reload-brunch's Introduction

auto-reload-brunch

Adds automatic browser reloading support to Brunch when using the brunch watch command.

The plugin uses WebSocket technology to pass compile events to browser.

Usage

Install the plugin via npm with

npm install -S auto-reload-brunch

In most cases, auto-reload-brunch works out of the box without any further configuration. Stylesheet changes will be applied seamlessly, and any other changes will trigger a page refresh. To prevent a stylesheet from being reloaded automatically, set the data-autoreload="false" attribute on the stylesheet's link tag.

Brunch plugin settings

If customization is needed or desired, settings can be modified in your brunch config file (such as brunch-config.coffee):

  • enabled: (Boolean or Object) Defaults to true
    • As a boolean, turn on Auto-Reloading for any change in your project, or off entirely.
    • As an object, enable Auto-Reloading for specific types of changes. Keys are the file extensions of compiled files (js or css) or assets to cover any other watched files that do not get compiled. When an object is used, only the types explicitly set to true will trigger an Auto-Reload.
  • port: (Integer or Array of Integers) Defaults to [9485..9495]
    • The port to run the WebSocket server on. It will be applied automatically on the server and the client.
    • If an array, it will use the first value, but automatically fail over to the next value in the array if the attempted port is already in use on the system. This allows multiple instances to run without conflict.
  • delay: (Integer, in milliseconds) Optional, no default
    • If your system is having race-condition type problems when the browser tries to reload immediately after a compile, use this to set a delay before the reload signal is sent.
  • host: (Default: '0.0.0.0') Server's host address.
  • forceRepaint: (Default: false) forcefully repaint the page after stylesheets refresh. Enabled in Chrome by default to mitigate the issue when it doesn't always update styles.
  • keyPath: Optional, no default.
    • Path to private key used for SSL.
  • certPath: Optional, no default.
    • Path to public x509 certificate.
  • forcewss: Optional, no default.
    • make the client always use wss:// instead of ws://.

Example:

module.exports = {
  // ...
  // All settings are optional
  plugins: {
    autoReload: {
      enabled: {
        css: true,
        js: true,
        assets: false
      },
      port: [1234, 2345, 3456],
      delay: require('os').platform() === 'win32' && 200,
      keyPath: 'path/to/ssl.key',
      certPath: 'path/to/ssl.crt',
      forcewss: true
    }
  }
};

Client-side settings

If your brunch watch is running on a different machine than your preview screen, you can set server config variable to connect to a brunch/websocket server running at another ip address.

<script>
  window.brunch = window.brunch || {};
  window.brunch.server = '192.168.1.2';
</script>

You can also set the port (single integer only) and/or disable auto-reload via client-side scripting, although generally it's a better idea to use brunch config for this:

window.brunch['auto-reload'] = window.brunch['auto-reload'] || {};
window.brunch['auto-reload'].port = 1234
window.brunch['auto-reload'].disabled = true;

Custom file extensions

You can configure what extensions count as stylesheet and javascript reloads. By default, any compile file with an extension other than .css or .js will do a full page reload. The match option allows you to issue efficient stylesheet-only reloads for other file extensions as well.

The value of match.stylesheets and match.javascripts is an anymatch set, and so can be a wildcard, regexp, function, or an array thereof.

module.exports = {
  // ...
  plugins: {
    autoReload: {
      match: {
        stylesheets: ['*.css', '*.jpg', '*.png'],
        javascripts: ['*.js']
      }
    }
  }
};

License

The MIT License (MIT)

Copyright (c) 2012-2017 Paul Miller (http://paulmillr.com)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

auto-reload-brunch's People

Contributors

anaphase avatar cesutherland avatar christopherscott avatar clarknelson avatar colinbate avatar denysdovhan avatar dependabot[bot] avatar es128 avatar goshacmd avatar icholy avatar iki avatar ktmud avatar nshafer avatar paulmillr avatar reubano avatar row1 avatar rstacruz avatar shreeve avatar shvaikalesh avatar smazurov avatar squaresurf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

auto-reload-brunch's Issues

[Webkit Browser] refresh in 2 time

Hello,
When i use browser based on webkit (Chrome/Opera) On Windows (Seven/10) tested.
Content is refresh with 1 time of retard,
Explain :

  • Start with text '1'
  • Display 1
  • Edit text to '2'
  • Display 1
  • Edit text to '1'
  • Display 2

Need 2 Refresh to show good data.
Delay change nothing set to 5s (5000ms) give same result.
Work perfectly on Firefox.

Config :
OS : 7/10
Node : 4.6.1
auto-reload-brunch : "auto-reload-brunch": "^2.7.1",
Brownser tested : Firefox|Chrome|Opera : Lastest

Ask more information if needed.

EADDRINUSE on brunch 1.6.5

Cannot start brunch watch on v1.6.5 with auto-reload included. Immediately get:

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: listen EADDRINUSE
    at errnoException (net.js:863:11)
    at Server._listen2 (net.js:1008:14)
    at listen (net.js:1030:10)
    at net.js:1104:9
    at dns.js:72:18
    at process._tickCallback (node.js:415:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:903:3

Still happens after I restarted my machine to make sure I didn't have a hidden brunch instance taking up the port or something like that.

don't stop reloading with latest brunch 2.9.1

With brunch 2.8.2 it works like a charm, but with brunch 2.9.1 it seems to reload after the preCompile hook.

here my brunch-config

module.exports = {
  npm: {
    globals: {
      $: 'jquery',
      jQuery: 'jquery',
      _: "underscore",
      riot: "riot",
      UIKit: "uikit"
    },
    styles: {
      select2: ['dist/css/select2.css'],
    }
  },
  hooks: {
    preCompile: (end) => {
      var fs = require('fs');

      // JS
      fs.createReadStream('node_modules/uikit/dist/js/components/pagination.js').pipe(fs.createWriteStream('app/vendors/uikit-pagination.js'));
      fs.createReadStream('node_modules/uikit/dist/js/components/form-select.js').pipe(fs.createWriteStream('app/vendors/uikit-form-select.js'));
      fs.createReadStream('node_modules/uikit/dist/js/components/datepicker.js').pipe(fs.createWriteStream('app/vendors/uikit-datepicker.js'));
      fs.createReadStream('node_modules/uikit/dist/js/components/notify.js').pipe(fs.createWriteStream('app/vendors/uikit-notify.js'));
      fs.createReadStream('node_modules/uikit/dist/js/components/timepicker.js').pipe(fs.createWriteStream('app/vendors/uikit-timepicker.js'));
      fs.createReadStream('node_modules/select2/dist/js/select2.js').pipe(fs.createWriteStream('app/vendors/select2.js'));
      //// CSS
      fs.createReadStream('node_modules/uikit/dist/css/uikit.almost-flat.css').pipe(fs.createWriteStream('app/vendors/0-uikit.css'));
      fs.createReadStream('node_modules/uikit/dist/css/components/datepicker.gradient.css').pipe(fs.createWriteStream('app/vendors/1-uikit-datepicker.css'));
      fs.createReadStream('node_modules/uikit/dist/css/components/form-select.gradient.css').pipe(fs.createWriteStream('app/vendors/3-uikit-form-select.css'));
      fs.createReadStream('node_modules/uikit/dist/css/components/notify.gradient.css').pipe(fs.createWriteStream('app/vendors/4-uikit-notify.css'));
      fs.createReadStream('node_modules/uikit/dist/css/components/autocomplete.gradient.css').pipe(fs.createWriteStream('app/vendors/5-uikit-autocomplete.css'));
      //// Fonts
      fs.createReadStream('node_modules/uikit/dist/fonts/fontawesome-webfont.ttf').pipe(fs.createWriteStream('app/assets/fonts/fontawesome-webfont.ttf'));
      fs.createReadStream('node_modules/uikit/dist/fonts/fontawesome-webfont.woff').pipe(fs.createWriteStream('app/assets/fonts/fontawesome-webfont.woff'));
      fs.createReadStream('node_modules/uikit/dist/fonts/fontawesome-webfont.woff2').pipe(fs.createWriteStream('app/assets/fonts/fontawesome-webfont.woff2'));
      fs.createReadStream('node_modules/uikit/dist/fonts/FontAwesome.otf').pipe(fs.createWriteStream('app/assets/fonts/FontAwesome.otf'));
      
      end();
    }
  },
  files: {
    javascripts: {
      joinTo: {
        'js/js.js': /^app\/[js|widgets]/,
        'js/vendors.js': [/^(?!app)/, /^app\/vendors/ ], 
      }
    },
    stylesheets: {
      joinTo: {
        'css/css.css': /^app\/[css]/,
        'css/vendors.css': [/^(?!app)/, /^app\/vendors/],
      },
    },
  },
  plugins: {
    htmlPages: {
      compileAssets: true
    }
  },

  overrides: {
    production: {
      paths: {
        public: 'dist'
      }
    } 
  }
  
};

using auto-reload with nginx and docker

our setup is slightly odd (!) in that we are using a dynamic nginx setup with docker, so that when a docker container spins up, it registers a domain with nginx and secures it with https from let's encrypt

so, I spin up my container foo, and run a node process on port 3000. In the background, foo.myapp.io is registered, and nginx listens for a https connection on port 443, and forwards the connection to the foo docker container on port 3000

However, there is a problem in that we can only use standard ports (80 / 443) in order to get round some firewall issues. We get round this by generating another domain wss-foo.myapp.io and mapping that request to the internal port 9485

All's well and good at this point - npm start fires up, and I can indeed access the server

However, the problems start with auto-reload

  1. internally, within the docker container, the brunch process is running http, byt nginx is running https. This means that the auto-reload websocket server starts on plain http, and the injected client code tries to use ws:// which then causes problems with https and an insecure ws call

this can be fixed by adding an extra option to the auto-reload config, and using wss if this option is set

  1. The second problem is slightly harder : the injected client uses the server name that is started (ie foo.myapp.ip, where I actually need it to use wss-foo.myapp.io

I was looking at the code in auto-reload-brunch, and in the vendor folder, there is the auto-reload.js client code. This code is where it uses the server.

I was interested to see this line of code

var ar = br['auto-reload'] = (br['auto-reload'] || {});

does that mean that there is a way of getting some config data from the server to the client ? If so, then I can add another extra option to the config, a wss hostname

So, at the end of a very long issue : the real question is,

Is it possible to get the auto-reload.js client file to use options from the server ?

thanks.

I this intended to work with a chromeless browser?

I'm trying to get this to run together with spotify apps for faster development cycles. The spotify apps container is basically a modified chrome under the surface So I don't see a reason why it shouldn't work ... but no success yet.

The autoloader plugin seems to work "on the server side" but no reload happens in the spotify app :(

jquery required?

without jquery in vendors included there is no auto reload: true?
What if I do not need jquery and dont want it to bring it into the build?
And after development has finishe even the autoreload.js is in the final build, but not needed anymore.

Error thrown when saving config.coffee twice in a row quickly

28 Oct 10:02:20 - info: compiled boilerplate.jade and 2 cached files into dontUseMe in 129ms
28 Oct 10:02:25 - info: Reloading watcher...
28 Oct 10:02:28 - info: Reloading watcher...

/Users/eshanker/Code/writers-vanilla-brunch/node_modules/auto-reload-brunch/node_modules/ws/lib/WebSocketServer.js:44
    this._closeServer = function() { self._server.close(); };
                                                  ^
TypeError: Cannot call method 'close' of undefined
    at WebSocketServer._closeServer (/Users/eshanker/Code/writers-vanilla-brunch/node_modules/auto-reload-brunch/node_modules/ws/lib/WebSocketServer.js:44:51)
...

Error: Failed to construct 'WebSocket': The URL 'ws://:9486' is invalid.

Hi guys. I'm trying to use brunch with auto-reload-brunch for a node-webkit (now NW.js) project.

My package.json:

{
  "name": "slingchat-nw-build",
  "version": "0.0.1",
  "main": "_public/index.html",
  "scripts": {
    "watch": "brunch watch",
    "open": "nw _public"
  },
  "dependencies": {
    "auto-reload-brunch": "1.7.x",
    "brunch": "1.7.x",
    "css-brunch": "1.7.x",
    "javascript-brunch": "1.7.x",
    "less-brunch": "1.7.x",
    "nw": "^0.12.0-alpha2"
  }
}

My config.coffee:

exports.config =
  modules:
    definition: false
    wrapper: false

  paths:
    public: '_public'

  files:
    javascripts:
      joinTo:
        'js/app.js': /^app/

    stylesheets:
      joinTo:
        'css/app.css': /^app/

  minify: true

When I run npm run watch (which runs brunch watch) I see that the autoreload script is prepended to _public/js/app.js. However when I then run npm run open I get the following error in the console and autoreload doesn't work:

[16989:0125/125155:ERROR:nw_shell.cc(324)] Error: Failed to construct 'WebSocket': The URL 'ws://:9486' is invalid.
    at Error (native)
    at connect (file:///Users/kevin/Workspace/slingchat-nw/_public/js/app.js:40:22)
    at file:///Users/kevin/Workspace/slingchat-nw/_public/js/app.js:54:3
    at file:///Users/kevin/Workspace/slingchat-nw/_public/js/app.js:55:3
[16989:0125/125155:INFO:CONSOLE(40)] "Uncaught SyntaxError: Failed to construct 'WebSocket': The URL 'ws://:9486' is invalid.", source: file:///Users/kevin/Workspace/slingchat-nw/_public/js/app.js (40)

Node-webkit opens the local file file:///Users/kevin/Workspace/slingchat-nw/_public/index.html, is that maybe the problem? How would I make this work? The whole idea behind node-webkit is of course to open a local file rather then something running off a server.

Allow port config to be array

Depends on #31

Cycle through in case of errors from the port being already in use.

Range can be defined like [12345...12356] in CS.

Default setting should provide a range of 10 or so.

Will allow multiple instances to just work seamlessly.

Causes JSHint to fail

If you use Brunch JSHint without explicitly specifying the path to lint auto reload will fail with with the following error:

error: Linting of 'node_modules/auto-reload-brunch/vendor/auto-reload.js' failed. JSHint detected 2 >problems:
3 | var WebSocket = window.WebSocket || window.MozWebSocket;
^ Missing "use strict" statement.
3 | var WebSocket = window.WebSocket || window.MozWebSocket;
^ 'WebSocket' is defined but never used.

auto-reload-brunch hack for backend express

I hacked a 'backend development' feature into auto-reload-brunch to help me with some dev work and as a proof of concept. Its working pretty well so I'm sharing it. Maybe there's something already like it, but if there is, it should be easier to find.

Its probably outside the scope of auto-reload-brunch so I'm not attempting a PR, but is it really? I found the usual custom --server not useful for backend work because it doesn't reload and doesn't interface well with an express app.

If you don't include the necessary configs in brunch-config.js nobody would even know its even there.

https://github.com/kswope/auto-reload-brunch-express

Auto-reconnect

Client side code should attempt to re-connect on an interval after it loses the ws connection. In doing so auto-reload will survive through brunch restarts, config edits, and other glitches without requiring a hard restart to get it to reconnect.

support for brunch 1.4.4

hi,

I'm new both to brunch and coffescript, but from the docs I see that the plugin API has changed quite a bit, and autoreload does not support brunch v 1.4.x

are there any plans to add support to it?

I've tried to exercise my coffee skills in rewriting the plugin, but it seems to be a bit too much as a first try in brunch+coffee

Doesn't appear to work on upgraded version

Hi,
Just tried this module out, and not having a great deal of success. Have added to my projects package.json, restarted brunch, and added the lines to my browser.

I'm using jade/stylus compilers.

Debugging client side in chrome shows an open websocket but the onmessage callback never gets hit.

Am I missing something obvious? How can I provide more useful debug info for you?

Cheers,
Chris

Auto reload with Flo ?

Hi,

It's my first project with Brunch and I want to use this plugin to do live reload.
I have a dead-simple project with the following brunch-config:

exports.config =
  plugins:
    autoReload:
      enabled:
        css: on
        js: on
        assets: on
      port: [8888]
  files:
    javascripts:
      joinTo: 'app.js'
    stylesheets:
      joinTo: 'app.css'
    templates:
      joinTo: 'app.js'

I also installed flo-fb Chrome extension. I can see that brunch is doing great:

$ dead-simple> brunch w --server
07 Nov 22:25:54 - info: application started on http://localhost:3333/
07 Nov 22:25:54 - info: compiled 2 files and 1 cached into 2 files, copied 2 in 268ms
07 Nov 22:26:14 - info: compiled in 67ms
07 Nov 22:27:08 - info: compiled flatty.css into app.css in 192ms

flo-fb is connected:

[session] Started

but nothing is happening... I'm doing something wrong ? the documentation is pretty straightforward but how the browser is suppose to listen ?

Thanks ๐Ÿ˜„

Configurable delay

See #36.

Add the ability the set an arbitrary delay period before sending the reload message to the browser.

Client-side script not injected

Hi!

My current config.js looks like the following and using this setup the client-side websocket code is not injected into app.js nor vendor.js:

exports.config = {
  files: {
    javascripts: {
      joinTo: {
        'js/app.js': /^app/,
        'js/vendor.js': /^(bower_components|vendor)/
      }
    },
   ...
};

Everything works fine if I use this configuration:

exports.config = {
  files: {
    javascripts: {
      joinTo: 'js/app.js'
    },
   ...
};

Why that? Stumbled upon this issue, but did not find a solution for my problem: brunch/brunch#419

Fails when resource recompile is "longish"

I've found auto-reload to fail multiple times requiring browser refresh for it to work. The reason was the WS connection timeout.

I worked on multiple projects and I've noticed that this problem doesn't exist when the resource reload is short (100-200ms) and thus guess (I'm not sure about it) that it fails due to that.

Doesn't work without vendor.js [edited]

This is probably just a problem with my setup but I just can't get auto-reload to work. I'm probably missing something obvious... do I need to install any kind of browser plugin? From what I can tell an auto-reload.js is supposed to be injected in my page but it's not loading. Any pointers would be much appreciated.

Getting a WebSocket error in Chrome

WebSocket connection to 'ws://my-domain:9485/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED auto-reload.js:69

I have the site hosted on a vagrant box, brunch watch is running locally. I have tried the config option to set the server which has no effect also.

Any insight into this issue?

1.7.2 gives error: Reading of 'node_modules/vendor/auto-reload.js' failed. ENOENT, open 'node_modules/vendor/auto-reload.js'

Steps to reproduce:
brunch new https://github.com/julienaubert/brunch_knockout/ frontend
cd frontend
brunch w -s
27 Feb 12:07:53 - error: Reading of 'node_modules/vendor/auto-reload.js' failed. ENOENT, open 'node_modules/vendor/auto-reload.js'

brunch --version: 1.7.13
node --version: v0.10.25
config.json: https://github.com/julienaubert/brunch_knockout/blob/master/config.js
package.json: https://github.com/julienaubert/brunch_knockout/blob/master/package.json

If I uninstall auto-reload-brunch and specifically install 1.7.1 it works fine.

CPU usage with 1.7.0

I juste updated from v1.6.5 to 1.7.0 and my CPU usage jumped from ~15% to ~25% with "brunch watch" under Windows. (I have the same problem with 1.7.1).
I'm using brunch 1.7.10.
I suspect that it has something to do with the worker update, but I'm not sure.
I have tried enabling the workers in my brunch config file:

workers: {
    enabled: true
}

But the problem remains with or without workers enabled ...

Reload on ANY changes

Hi, yesterday i wanted to use some .html mixins with jade

The problem is that saving .html in /app (or any subdir) did not trigger a reload.

I tinkered with the config.coffee but i couldnt get it to work.

How can i get it ro respond to ANY change in a certain dir (e.g. app)

Forgive me if i am just to stupid!
thx in advance

Custom file extensions

Would you be open to supporting custom file extensions to define different extensions other than .css and .js?

My setup is that I compile my css to application.css.erb for consumption in Rails. This triggers a needless page reload when stylesheets would do. I'd like .css.erb to trigger a compilation.

Proposed solution

I see there's this code that checks if the changes are JS, CSS, or other:

const isCss = file => sysPath.extname(file.path) === '.css';
const isJs = file => sysPath.extname(file.path) === '.js';

const allCss = didCompile && changedFiles.every(isCss);
const allJs = this.liveJs && didCompile && changedFiles.every(isJs);

I propose we implement an option autoReload.match.css (and js), where the value is an anymatch set:

plugins:
  autoReload:
    match:
      css: ['*.css', '*.css.erb']
      js: '*.js'

So something like this should do it:

cssMatch = plugins.autoReload.match.css || '*.css'
isCss = (file) => anymatch(cssMatch, file.path)

I can make a PR for this if you agree with the change.

Chrome doesn't update until mouseover

I'm having this strange issue where stylesheet changes don't appear in Chrome until I move my mouse over the browser window or bring Chrome to the foreground.

In Safari, changes take place immediately. Changes that require a page refresh also happen immediately.

I'm using a OS X Mavericks with Chrome 36.0.1985.125

Any ideas what that's about?

Fails to reload when non-bundled files are changed

Use-cases where we need to auto-reload even if the file is not part of the final bundle (I'm sure there are more):

  • stylus: @import _non-compiled
  • jade: include partial

If _non-compiled.styl or partial.jade are changed, the browser never knows about it. The work around is terrible:

  1. Find & open the file includeing or importing the file you just edited
  2. Save it
  3. Close it
  4. go back to your task
  5. ^ back to 1

Support configuration for WebSockets SSL

var connection = new WebSocket('ws://' + host + ':' + port);

Need to to be able to configure use of SSL, like this:

var connection = new WebSocket('wss://' + host + ':' + port);

Error on build/watch

Experimenting with autoreload and brunch and I'm getting this error:

/Users/Chris/Websites/Sandbox/testsite/node_modules/auto-reload-brunch/lib/index.js:33
      if (!this.config.persistent) return;
                      ^
TypeError: Cannot read property 'persistent' of undefined
    at module.exports.AutoReloader.onCompile (/Users/Chris/Websites/Sandbox/testsite/node_modules/auto-reload-brunch/lib/index.js:33:23)
    at helpers.loadPackages.callCompileCallbacks (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:190:18)
    at Array.forEach (native)
    at helpers.loadPackages.callCompileCallbacks (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:189:26)
    at getCompileFn (/usr/local/lib/node_modules/brunch/lib/commands/watch.js:148:16)
    at module.exports.write (/usr/local/lib/node_modules/brunch/lib/fs_utils/write.js:65:14)
    at async.forEach (/usr/local/lib/node_modules/brunch/node_modules/async/lib/async.js:94:25)
    at exports.writeFile (/usr/local/lib/node_modules/brunch/lib/fs_utils/common.js:31:16)
    at fs.close (/usr/local/lib/node_modules/brunch/node_modules/rimraf/node_modules/graceful-fs/graceful-fs.js:94:5)
    at Object.oncomplete (fs.js:297:15)

Thanks!

Help the newbies by telling them where to put the package

Hi,

I'm very new to all of this, but I wanted to use this auto-reload-brunch. Your site said add it to the package.json

So I didn't know where to add it in there, so I spent 10 minutes trying different places. Eventually I found to add it in dependancies like:

"dependencies": {
"auto-reload-brunch": "1.2.0",

This works.

Can you edit your document to make it really clear where to add it for the newbies like me?

Thanks, Philip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.