Closed dz0ny closed 11 years ago
@aeischeid they are shortcuts for settings object.
.set('filename', path) //path to jade file to compile .set('compress', true) // minify css .set('include css', true) // import("somestyle.css") injects css file to output buffer
Sorry it has taken a bit to get to this. So the compress, and filename are really only needed if we are nesting stylus in a jade template? Otherwise hem handles that instead of stylus
If so any suggestions on how to make that conditional?
While I am at it I may want to include some extra debuging stuff that stylus makes available. for example: .set('line-numbers', ('-d' in process.argv) or ('--debug' in process.argv)) .set('firebug', ('--firebug' in process.argv))
.set('include css', true) would be really useful here - and in all honesty, I think it probably would be better as the default (there are still other ways to output a literal include where necessary).
Perhaps there could be some compiler options settable from slug.json, with the usual good defaults, as well as CLI options?
included this.
.set('include css', ('--includeCss' in process.argv)) .set('compress', not('-d' in process.argv) and not('--debug' in process.argv))
not sure what the full purpose of the
.set('filename', path) //path to jade file to compile
@dz0ny how would I test that this is doing what you expect?
we have jade in and working on dev branch, what do those .set lines do in the stylus compiler block?