mixu / gluejs

Build CommonJS modules for the browser via a chainable API
http://mixu.net/gluejs/
165 stars 13 forks source link

No API for transform #27

Open svizzari opened 10 years ago

svizzari commented 10 years ago

@mixu Is this intentional? Also, I see you could potentially activate multiple transforms but it isn't documented, or in tests (that I can see), how you might do this.

panta commented 10 years ago

any news on this? I'd like to use https://github.com/ngryman/grunt-glue-js with coffeeify and if I'm correct we'd need transform as an API, right?

mixu commented 10 years ago

you can actually pass in the --command command line option via options.command, here are a couple of examples:

gluejs.set('command', 'uglifyjs --no-copyright')

gluejs.set('command', [
  function(filename, pkg) {
    return function() {
      return require('coffeeify')(filename);
    };
  }
])

You can also use options.transform to set the --transform command line parameter

panta commented 10 years ago

Great! Thank you!