Next Phenomenal Microbrewery
Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

@wpdevops/elixir-stylus

1.0.1 • Public • Published

Usage

This WpDevOps Elixir extension allows you to compile Stylus.

Installation

First, pull in the extension through NPM.

npm install --save-dev @wpdevops/elixir-stylus

That's it! You're all set to go!

Usage

Assuming you write...

elixir(function(mix) {
   mix.stylus('app.styl');
});

...this will compile your assets/stylus/app.styl file to ./dist/css/app.css.

If you'd like to set a different output directory, you may pass a second argument to the stylus() method, like so:

mix.stylus('app.styl', './dist/scripts/styles.css')

Finally, if you want to override the Stylus plugin options, you may pass an object as the third argument.

mix.stylus('app.styl', null, {});
 
// See options at: https://www.npmjs.com/package/gulp-stylus#options

PostCSS

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 mix.stylus() -

var postStylus = require('poststylus'); // npm install --save-dev poststylus
 
mix.stylus('app.styl', null, {
   use: [postStylus(['lost', 'postcss-position'])] // npm install --save-dev postcss-position
});

This package was originally (laravel-elixir-stylus) written by Jeffrey Way

install

npm i @wpdevops/elixir-stylus

Downloadsweekly downloads

0

version

1.0.1

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar