1. laravel-elixir-stylus
Laravel Elixir Stylus Extension
laravel-elixir-stylus
Package: laravel-elixir-stylus
Created by: JeffreyWay
Last modified: Sun, 19 Jun 2022 10:40:06 GMT
Version: 2.0.3
License: MIT
Downloads: 109
Repository: https://github.com/JeffreyWay/laravel-elixir-stylus

Install

npm install laravel-elixir-stylus
yarn add laravel-elixir-stylus

Usage

This Laravel Elixir extension allows you to compile Stylus.

Installation

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 protected]. Otherwise, stick with [email protected].

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

Usage

Assuming you write...

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

...this will compile your resources/assets/stylus/app.styl file to ./public/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', './public/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'])]
});

RELATED POST

10 Must-Know Windows Shortcuts That Will Save You Time

10 Must-Know Windows Shortcuts That Will Save You Time

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Arrays vs Linked Lists: Which is Better for Memory Management in Data Structures?

Navigating AWS Networking: Essential Hacks for Smooth Operation

Navigating AWS Networking: Essential Hacks for Smooth Operation

Achieving Stunning Visuals with Unity's Global Illumination

Achieving Stunning Visuals with Unity's Global Illumination

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code

Nim's Hidden Gems: Lesser-known Features for Writing Efficient Code