These are chat archives for brunch/brunch

27th
Dec 2016
Yuriy Tsemashko
@azzz
Dec 27 2016 22:07
Hi guys. Is it possible to change default "app" folder in config?
I want to build such folders tree: http://take.ms/8N0cQ
i.e. app contains assets, front and some-stuff. All JS code is located it app/front/js and CSS is in app/front/css.
Brunch builds my front/*.js files but adds a prefix front/js/:
app.js:
require.register("front/js/greetings.js", function(exports, require, module) {
});
my brunch config:
// See http://brunch.io for documentation.
exports.config = {
  files: {
    javascripts: {joinTo: '/js/app.js'},
    stylesheets: {joinTo: '/css/app.css'},
    templates: {joinTo: '/js/app.js'}
  },

  conventions: {
    assets: /^(app\/assets)/
  },

  paths: {
    watched: [
      "app/front",
      "app/assets"
    ]
  }
};
i'm reading this doc http://brunch.io/docs/config but i can't find anything :[
Mauro Oviedo
@moviedo
Dec 27 2016 22:33
@azzz yes u can
you can override config.path
Yuriy Tsemashko
@azzz
Dec 27 2016 22:34
i just found a kind of workaround: override nameCleaner function in modulesobject
Mauro Oviedo
@moviedo
Dec 27 2016 22:34
and change config.files.javascript.joinTo = 'path/to/*.js
Yuriy Tsemashko
@azzz
Dec 27 2016 22:35
@moviedo as you can see i already did it , i posted my config a few lines before:) It overrides a path to compiled bundle file
but it does not solve the issue that "app" folder is hardcoded by default and brunch generates app.js with paths relative to /app, like: front/js/greetings.js, but i want app/front/js to be my "application" folder
@shvaikalesh pls take a look here when you are online
Mauro Oviedo
@moviedo
Dec 27 2016 22:47
@azzz
exports.config = {
path: {
watched: ['app', 'test', 'vendor']
}
}
you need to change the values to watched to change what is watched in brunch
you may want watched: [‘app/assets’, ‘app/front’]
Yuriy Tsemashko
@azzz
Dec 27 2016 23:03
yes i did it