4.0.0 • Published 2 years ago

postcss-easy-import v4.0.0

Weekly downloads
35,274
License
MIT
Repository
github
Last release
2 years ago

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

@mikestopcontinues/postcss-config-contoursessungatsby-theme-ghost-reloaded@dubb/mickeyxr3-client@native-elements/coresimplistic-css@everything-registry/sub-chunk-2460supple-preprocessorrcostexamreact-activity-feed-streampostcss-easy-toolspostcss-tailwindcss-config-creatorswrve-react-scriptsticketmelon-webs.csssuitcss-preprocessorsw-react-scriptsempress-blog-starter-templateempress-blog-swf-casper-templateempress-blog-casper-templateember-cli-tailwindember-bedrockgatsby-theme-try-ghostghost-spiritlsv-componentsifuineutrino-preset-fusionary-webneat-gulp-xgjmetaserve-css-postcssgpupo-npm-devnartex.concise.cssmvf-patternshiqkrauira-npxperitext-generator-nextpengliheng-componentnpm-npxpineglade-appcssplus-preprocessorcthreem-core-tailwindcss@highpoint/merge-scss@dh253/nds@fusionary/postcss-base@fusionary/postcss-config@frosti/config@dgrammatiko/joomla-toolswcxdeng-npx@khirayama/handle-ui@khirayama/react-ui-components@kard/webpack-config@kard/react-toolswindbreaker-tailwindweb-styleguide-nexttwreporter-react-index-pagevcl-preprocessorvue-customvue-merge-lessvizz-wysiwygzent-kitcokit@infinitebrahmanuniverse/nolb-postcss-e@notiv/gulp-builder@metamodern/static@mamba/configs@mambasdk/configs@sapper-dragon/postcss@dubb/junior@talentgarden/react-components@swrve/react-scripts@swrve/swrve-react-scripts@tutor2u/tutor2u-ui@vizzuality/wysiwyg@zalastax/nolb-postcss-e@fiizy/postcss@spatie/webpack@alanquigley/react-scripts@etidbury/ts-next-helpers@usehenri/react@tilnet/wp-frontendairduct@actonate/mirkwood-rx@alotool/bl-pack@alotool/blogger-pack@arxpoetica/sapper-trimmingsasm.cssbelge@cangir/gatsby-theme-casper-v3bloggerpackbrady-sutton-react-scripts@bluecadet/drops@coffeekraken/s-postcss-builder@concisecss/preprocessorchange-style-vars
4.0.0

2 years ago

3.0.0

7 years ago

2.1.0

7 years ago

2.0.0

7 years ago

1.0.1

8 years ago

1.0.0

8 years ago