🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

stylus-vars-loader

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stylus-vars-loader

Prepend your vars files (@imports) to your styl files.

latest
Source
npmnpm
Version
1.0.4
Version published
Maintainers
1
Created
Source

This simple loader will prepend the file (or files) of your choice hosting your variables to stylus files.

For example, say you have an index.js file and you do this import './index.styl' then instead of always referencing your global vars.styl file from the index.styl, you can use the loader to do it for you.

Install

npm i -D stylus-vars-loader or yarn add stylus-vars-loader

Use

{
  test: /\.styl$/,
  use: [
    'style-loader',
    'css-loader',
    'stylus-loader',
    {
      loader: 'stylus-vars-loader',
      options: {
        file: './css/vars.styl',

        // you can also do multiple files
        file: ['./css/vars.styl', './css/media-queries.styl'],

        // glob too
        file: './css/vars/*',
      },
    },
  ]
}

Special thanks to Juho for always sharing pointers when asked to.

FAQs

Package last updated on 12 Mar 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts