This Laravel Elixir extension allows you to compile Stylus.
First, pull in the extension through NPM.
npm install --save-dev laravel-elixir-stylus
Note: if using Laravel Elixir 6 or higher, pull in
email@example.com. Otherwise, stick with
Next, add it to your Elixir-enhanced Gulpfile, like so:
var elixir = ;;;
That's it! You're all set to go!
Assuming you write...
...this will compile your
resources/assets/stylus/app.styl file to
If you'd like to set a different output directory, you may pass a second argument to the
stylus() method, like so:
Finally, if you want to override the Stylus plugin options, you may pass an object as the third argument.
mix;// See options at:
This extension includes a PostCSS adapter out of the box, as well as support for the incredibly impressive Lost grid system. Check out the documentation in that link, and immediately start using it in your projects with this extension. Zero setup. :)
If there are other PostCSS plugins you want to pull in, you may use the third argument to
var postStylus = ; // npm install --save-dev poststylusmix;