You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Heya so I've made a modified version of jadeify that just looks for mixins in the required jade file and returns them as template functions. It's pretty hacky as jade doesnt expose a nice way to do this currently - but it does work.
It would be possible to integrate that back into this project somehow - the question is should it be? Check out the repo and let me know what you think.
If you think it's a not-too-abhorrent idea I could submit a PR. Or alternatively if you can see a far less hacky way of getting this done please let me know!
The text was updated successfully, but these errors were encountered:
Fascinating. I've never used this feature of Jade, but it seems pretty cool. I'm not sure how or whether it should integrate with jadeify. For example, can I define a template (like normal jadeify) and a mixin? What about several mixins? The readme implies the name matters but doesn't give an example of more than one mixin.
My initial instinct is that this is better as a separate package, but I'm willing to be persuaded.
The hackiness is also pretty crazy. Have you considered asking the Jade maintainer for some new APIs that would make it less hacky? The eval in particular is concerning.
It is very useful - but you're right it is a very, very hacky workaround the lack of a mixin API. It just got even more hacky as it now supports mixins within mixins - which is a concern but the end result is very useful...
There is some chatter over here but it depends on another PR in 2.0 that sounds like it may not get in.
I think I could make them work together - but it would probaly require an API change for jadeify. After further thought I think it should probably stay separate unless it becomes less hacky. Whilst it works and I will add some tests I feel like it may well end up being a maintenance nightmare considering it relies on unexposed functionality to work. Cheers for even considering it though :p
Heya so I've made a modified version of jadeify that just looks for mixins in the required jade file and returns them as template functions. It's pretty hacky as jade doesnt expose a nice way to do this currently - but it does work.
It would be possible to integrate that back into this project somehow - the question is should it be? Check out the repo and let me know what you think.
If you think it's a not-too-abhorrent idea I could submit a PR. Or alternatively if you can see a far less hacky way of getting this done please let me know!
The text was updated successfully, but these errors were encountered: