nuxt-stylus-resources-loader

Stylus resources (e.g. variables, mixins etc.) module for Nuxt
4,577 24
Install
npm install nuxt-stylus-resources-loader
Latest Version:2.0.0
Vue:2
License:MIT
Last Updated:Dec 14, 2018
Links: GitHub  ·  npm
Maintainer: weotch

nuxt-stylus-resources-loader

This module does all the hard work of configuring global stylus mixins, functions, variables, etc. for your Nuxt application.

Install

npm i nuxt-stylus-resources-loader

# or

yarn add nuxt-stylus-resources-loader

Usage

// nuxt.config.js
import {resolve} from 'path'

module.exports = {
  modules: [
    // provide path to the file with resources
    ['nuxt-stylus-resources-loader', resolve(__dirname, 'path/to/resources.styl')],

    // or array of paths
    ['nuxt-stylus-resources-loader', [
        resolve(__dirname, 'path/to/first-resources.stylus'),
        resolve(__dirname, 'path/to/second-resources.styl'),
    ]],
  ],
}

Glob pattern matching

You can specify glob patterns to match your all of your files in the same directory.

// Specify a single path
'./path/to/resources/**/*.styl', // will match all files in folder and subdirectories

// or an array of paths
[ './path/to/resources/**/*.styl', './path/to/another/**/*.styl' ]

Note that stylus-resources-loader will resolve your files in order. If you want your variables to be accessed across all of your mixins you should specify them in first place.

License

MIT

Related Packages

nuxt-define

One utility function for module authors to define compiler constants for all bui...

13,412,511
@lg2/nuxt3-module-create-dato-map

nuxt3-module-create-dato-map

2,869 0
nuxt-csurf

Nuxt Cross-Site Request Forgery (CSRF) Prevention

6,263,746 91
@bg-dev/nuxt-naiveui

Unofficial Naive UI module for Nuxt

144,316 187
@ztl-uwu/nuxt-content

Write your content inside your Nuxt app

34,108

Version History

Version Released Vue License
2.0.0 ^2.0 MIT
1.1.3 MIT
1.1.2 MIT