Closed refractalize closed 10 years ago
Some transforms allow options to be passed to them, and this is supported in browserify command line and API, but not (yet anyway) in browserify-middlware.
Here's the line that's interesting: https://github.com/ForbesLindesay/browserify-middleware/blob/master/lib/compile.js#L96
Options can be a hash passed as the first argument to transform([options], transform). Question is, how should they be specified in the browserify-middleware API?
transform([options], transform)
The obvious thing to do is supply an array, with the options and string/function, or just a string/function:
options.transforms = [[{relativeUrls: true}, 'lessify'], 'html2js']
Unless you have a better idea?
Happy to make a pull request, just wanted to check with you before I went ahead.
See #52
Some transforms allow options to be passed to them, and this is supported in browserify command line and API, but not (yet anyway) in browserify-middlware.
Here's the line that's interesting: https://github.com/ForbesLindesay/browserify-middleware/blob/master/lib/compile.js#L96
Options can be a hash passed as the first argument to
transform([options], transform)
. Question is, how should they be specified in the browserify-middleware API?The obvious thing to do is supply an array, with the options and string/function, or just a string/function:
Unless you have a better idea?
Happy to make a pull request, just wanted to check with you before I went ahead.