Closed calebeby closed 8 years ago
Do you have the jstransformer-stylus
package installed? This is the repository for that tool, not for stylus itself.
Yes, I do. I am wondering how to use Stylus's use
functionality with JSTransformers
@ForbesLindesay @RobLoach @andy-hanson Is this implemented? How do I use this?
I figured out how to use one module:
use: jeet()
after
jeet = require('jeet')
but how do I use more than one? I tried passing an array to use
, but then it errors with:
TypeError: fn.call is not a function
at Renderer.use
I'm thinking that c7079a8 has something to do with it?
@RobLoach I figured it out. Can you change
// special options with single parameter through their function names
for (var k in specialSingle) {
renderer[k](specialSingle[k]);
}
to
// special options with single parameter through their function names
for (var k in specialSingle) {
var options = []
if (typeof(specialSingle[k]) === 'object') {
options = specialSingle[k];
} else {
options = [specialSingle[k]];
}
for (var i in options) {
var option = options[i]
renderer[k](option);
}
}
Thanks.
Looks like a great improvement. Mind sending in a Pull Request? Then you'll get git author credit as a contributor :wink:
Yeah, sure. I'll try to make a pull request this afternoon
Or now. #16
Great work!
Hi, I need to use jeet on my project, but it is not documented how to use stylus's
use
(withjstransformer-stylus
).