gluejs icon indicating copy to clipboard operation
gluejs copied to clipboard

No API for transform

Open svizzari opened this issue 12 years ago • 3 comments

@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.

svizzari avatar Nov 28 '13 03:11 svizzari

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?

panta avatar Apr 04 '14 19:04 panta

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

mixu avatar Apr 04 '14 20:04 mixu

Great! Thank you!

panta avatar Apr 07 '14 12:04 panta