Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-import-ext-glob

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-import-ext-glob

A PostCSS plugin to extend postcss-import path resolver to allow glob usage as path

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9.8K
decreased by-13.18%
Maintainers
1
Weekly downloads
 
Created
Source

postcss-import-ext-glob Build Status Coverage Status

A PostCSS plugin to extend postcss-import path resolver to allow glob usage as path.

You must use this plugin along with postcss-import, place this plugin before postcss-import.

@import-glob "components/**/*.css";

Installation

$ npm install postcss-import-ext-glob

Usage

// Postcss plugins
postcss([
  require('postcss-import-ext-glob'),
  require('postcss-import')
]);

Check out PostCSS docs for the complete installation.

Example

This plugin transform this:

@import-glob "components/**/*.css";

into this:

@import "components/form/input.css";
@import "components/form/submit.css";
/* etc */

Thereby, the plugin postcss-import can now import each file.

You can pass multiple globs in one:

@import-glob "helpers/**/*.css", "components/**/*.css";

Options

You can pass a sort option to this plugin with a value of "asc" or "desc":

// Postcss plugins
postcss([
  require('postcss-import-ext-glob')({
    sort: 'desc'
  }),
  require('postcss-import')
]);

The sort order is by default ascending.

  • postcss-import - PostCSS plugin to inline @import rules content
  • fast-glob - Module used for getting glob entries
  • fast-sort - Module used for sorting glob entries

License

This project is licensed under the MIT license.

Keywords

FAQs

Package last updated on 13 Aug 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc