mikew / browserify-brunch

Brunch + Browserify
10 stars 7 forks source link

How to have live reload working with browserify-brunch #4

Open mpellerin42 opened 9 years ago

mpellerin42 commented 9 years ago

Hi,

I'm testing brunch with browserify-brunch to use npm to include angular in my project. The compilation works well, application is OK, but live reload doesn't work and I have a lot of warnings in console :

$ brunch w
04 May 14:42:42 - info: application started on http://localhost:3333/
04 May 14:42:43 - warn: 'app\app.js' compiled, but not written. Check your javascripts.joinTo config
.
04 May 14:42:43 - warn: 'app\configs.js' compiled, but not written. Check your javascripts.joinTo co
nfig.
04 May 14:42:43 - warn: 'app\controllers\contactCtrl.js' compiled, but not written. Check your javas
cripts.joinTo config.
04 May 14:42:43 - warn: 'app\services\contactService.js' compiled, but not written. Check your javas
cripts.joinTo config.
04 May 14:42:43 - warn: 'app\factories\contact.js' compiled, but not written. Check your javascripts
.joinTo config.
04 May 14:42:43 - info: compiled auto-reload.js into libraries.js, copied 3 in 2264ms
04 May 14:42:53 - info: copied index.html in 74ms

I'm new with brunch and browserify, so I'm not sure of my configuration. Here my brunch-config.js :

module.exports = {
    config: {
        paths: {
            watched: ['app']
        },
        files: {
            javascripts: {
                joinTo : {
                    'libraries.js': /^vendor/
                }
            }
        },
        modules: {
            wrapper: false,
            definition: false
        },
        server: {
            run:'yes'
        },
        plugins: {
            browserify: {
                bundles: {
                    'brunch-app.js': {
                        entry: 'app/app.js',
                        matcher: /^app/
                    }
                }
            }
        }
    }
};

and here my package.json

{
  "name": "browserify-brunch-test-app",
  "version": "0.0.1",
  "description": "",
  "main": "index.js",
  "author": "",
  "license": "MIT",
  "devDependencies": {
    "angular-ui-router": "^0.2.10",
    "auto-reload-brunch": "^1.7.8",
    "browserify": "^10.0.0",
    "browserify-brunch": "^1.7.2",
    "brunch": "^1.8.2",
    "javascript-brunch": "^1.7.1"
  },
  "dependencies": {
    "angular": "^1.3.15"
  }
}