Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rajdee/postcss-autoimport

PostCSS plugin for automatically import global dependencies.
https://github.com/rajdee/postcss-autoimport

global import postcss postcss-plugin

Last synced: 9 days ago
JSON representation

PostCSS plugin for automatically import global dependencies.

Awesome Lists containing this project

README

        

# PostCSS Autoimport [![Build Status][ci-img]][ci]

[PostCSS] plugin for automatically import global dependencies.

[PostCSS]: https://github.com/postcss/postcss
[ci-img]: https://travis-ci.org/rajdee/postcss-autoimport.svg
[ci]: https://travis-ci.org/rajdee/postcss-autoimport

## Installation

```console
$ npm install -D postcss postcss-autoimport

$ yarn add -D postcss postcss-autoimport
```

## Usage

```js
postcss([ require('postcss-autoimport')({
paths: [
'./css/common/_variables.css',
'./css/common/functions/',
...
]
}) ])
```

### Options

#### `paths`

Type: `Array`
Default: `[]`

An array of paths to directories or files which should be imported

#### `root`

Type: `String`
Default: process.cwd()

Define the root where to resolve path.

See [PostCSS] docs for examples for your environment.