Allow use of "raw" define
simshanith opened this issue · 7 comments
Stylus recently closed an issue & released in 0.44 regarding stylus.define
.
https://github.com/LearnBoost/stylus/issues/1286
While I could write my own middleware & load it as a Stylus plugin with grunt-contrib-stylus
use
option, a declarative way to pass a raw object sharing structure with the grunt config would be great.
Can you submit a failing test case for the usage you'd like to see that isn't currently supported?
@tkellen Submitted. Not sure what the best backwards-compatible implementation would be, but the ability to use Javascript objects as Stylus hashes is pretty great.
Awesome! This looks like a sane way to support the change. Would you mind adding some docs to docs/stylus-options.md
? Once that is sorted, we can merge and publish.
Documentation update pushed.
Ideally, rawDefine could alternatively accept an array of "define" keys that will use true
as the "raw" parameter. If set to true
, apply across all define keys.
This has been addressed in v0.15.1. Thanks for the great PR @simshanith !
Excellent work guys!