brunch / deppack

Extract node modules to browser.
MIT License
4 stars 13 forks source link

Allow to compile non-js node_modules (coffeescript, etc) #32

Closed goshacmd closed 8 years ago

goshacmd commented 8 years ago

Ref: https://github.com/brunch/brunch/issues/1309

Requires: https://github.com/brunch/brunch/pull/1353

goshacmd commented 8 years ago

@jahbini These PR should make your use case possible. I've tested locally with a dead simple skeleton plus a super simple npm package in coffeescript, and it seemed to work.

The only piece of config required is enabling coffeescript for npm processing:

module.exports = {
  // See http://brunch.io for documentation.
  files: {
    javascripts: {joinTo: 'app.js'},
    stylesheets: {joinTo: 'app.css'},
    templates: {joinTo: 'app.js'}
  },
  plugins: {
    npm: ['coffee-script-brunch']
  }
}
paulmillr commented 8 years ago

plugins.npm huh?

goshacmd commented 8 years ago

It is actually around since two weeks ago https://github.com/brunch/brunch/pull/1318

paulmillr commented 8 years ago

Missed it. The naming seems too generic. Could we change it to npm: {compilers: []}? No plugins.

jahbini commented 8 years ago

Much appreciated. This seems like an elegant solution that fits all the criterion

Bravo, My Compliments to The Chef. .

On May 9, 2016, at 10:01 PM, Gosha Arinich notifications@github.com wrote:

@jahbini https://github.com/jahbini These PR should make your use case possible. I've tested locally with a dead simple skeleton plus a super simple npm package in coffeescript, and it seemed to work.

The only piece of config required is enabling coffeescript for npm processing:

module.exports = { // See http://brunch.io for documentation. files: { javascripts: {joinTo: 'app.js'}, stylesheets: {joinTo: 'app.css'}, templates: {joinTo: 'app.js'} }, plugins: { npm: ['coffee-script-brunch'] } } — You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/brunch/deppack/pull/32#issuecomment-217845692

goshacmd commented 8 years ago

@paulmillr as this adds a new public deppack method, this is going to require a minor version bump (0.6.0?)