I have installed node.js/stylus/nib on my mac and I can manually compile .styl
file to .css
on the command line. I also know there is this stylus.middleware()
things that keeps coming up when I search for how to setup auto-compiling when the .styl
changes, however I have no idea how I am supposed to implement it (I have never used node.js before).
What file do I put that code in?
How do I start this code so it is always run?
I think I am missing a few things on the node side to be able to set this up.
From the command line you can use:
stylus -w folder/
or just for another example:
stylus -w styl/*.styl -o css/
It will watch for changes and compile all *.styl files that live under that folder.