Socket
Socket
Sign inDemoInstall

postcss-easy-import

Package Overview
Dependencies
38
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    postcss-easy-import

PostCSS plugin to inline @import rules content with extra features


Version published
Weekly downloads
30K
decreased by-10.26%
Maintainers
2
Install size
1.85 MB
Created
Weekly downloads
 

Changelog

Source

4.0.0

  • Update postcss to ^8.4.0 (major)
  • Update postcss-import to ^14.0.0 (major)
  • Update minimum Node version to >=10.0.0 (major)

Readme

Source

postcss-easy-import Build Status

PostCSS plugin to inline @import rules content with extra features.

Usage

postcss([ require('postcss-easy-import') ])

See PostCSS docs for examples for your environment.

Resolving files with globs

The path to the file will be checked and if it contains a glob it will be used to locate it. These can be mixed and matched with normal module paths:

@import "suitcss-utils-display"; /* node_modules */
@import "./theme.css"; /* relative path */
@import "./components/*.css"; /* glob */
@import "suitcss-utils-size/lib/*.css"; /* glob inside node_modules */

Options

This plugin is a postcss-import extension which introduces its own resolve option.

prefix

Type: false or string Default: false

Allows partial-like importing with a prefix before the filename.

@import 'modules/partial.css';
/* will import modules/_partial.css */

Prefixed versions are always favoured. Otherwise the non-prefix version is used:

├── _baz.css
├── baz.css
├── bar.css

The matched files would be ['_baz.css', 'bar.css'].

extensions

Type: array or string Default: .css

Defines file extensions which will be looked for.

License

MIT © Bogdan Chadkin

Keywords

FAQs

Last updated on 25 Feb 2022

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc