How do I get stylus to rebuild the css (including imports) automatically upon node restart and append the timestamp?
The problem as schaermu puts it:
My stylus stylesheets were always
recompiled, with one exception: when
using the @import directive, the
imported stylesheet was NOT recompiled
when a change was noticed. For that
case, i always had to manually delete
the stylesheet for a full re-compile.
edit:
there’s an issue:
https://github.com/LearnBoost/stylus/issues#issue/168
When i was building my own jade/stylus based apps, i used nodemon for development. It auto-restarts on any filechanges (after considering an ignore list, see the docs).
My stylus stylesheets were always recompiled, with one exception: when using the @import directive, the imported stylesheet was NOT recompiled when a change was noticed. For that case, i always had to manually delete the stylesheet for a full re-compile.
But in all other cases, rebuilding the stylesheets worked like a charm.
P.S. i assume you are using express as your framework of choice, my experience is based on that.