Socket
Socket
Sign inDemoInstall

postcss-easy-import

Package Overview
Dependencies
47
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
26K
decreased by-9.19%
Maintainers
2
Install size
3.21 MB
Created
Weekly downloads
 

Changelog

Source

2.0.0

  • Remove glob option and infer type of from the import path. Allows a mixture of glob and module imports to be used - (#14)
  • When prefix is set resolve non-prefixed version of a file if that is the only match, otherwise always favour the prefixed version - (commit)
  • Update ava 0.11.0 -> 0.16.0
  • Update eslint 2.0.0 -> 3.11.1
  • Update globby 4.0.0 -> 6.1.0
  • Update postcss-import 8.0.2 -> 9.1.0
  • Drop Node 0.12 support. Reached EOL on 31/12/2016 - (link)

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 */

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 12 Jan 2017

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