Socket
Book a DemoInstallSign in
Socket

@ptb/gatsby-plugin-stylus

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ptb/gatsby-plugin-stylus

Gatsby support for Stylus

latest
npmnpm
Version
1.1.13
Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

gatsby-plugin-stylus

Provides drop-in support for Stylus with or without CSS Modules

Install

yarn add gatsby-plugin-stylus

How to use

  • Include the plugin in your gatsby-config.js file.
  • Write your stylesheets in Stylus (.styl files) and require/import them

Without CSS Modules

// in gatsby-config.js
plugins: [`gatsby-plugin-stylus`];

With CSS Modules

Using CSS modules requires no additional configuration. Simply prepend .module to the extension. For example: App.styl -> App.module.styl. Any file with the module extension will use CSS modules.

With Stylus plugins

This plugin has the same API as stylus-loader, which means you can add stylus plugins with use:

// in gatsby-config.js
const rupture = require("rupture");

module.exports = {
  plugins: [
    {
      resolve: "gatsby-plugin-stylus",
      options: {
        use: [rupture()],
      },
    },
  ],
};

Keywords

gatsby

FAQs

Package last updated on 19 Dec 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