# postcss-processor

> Sugar way to create a postcss processor or get postcss plugins

Latest version **0.1.2** (published 2015-06-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install postcss-processor
pnpm add postcss-processor
yarn add postcss-processor
bun add postcss-processor
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2015-06-18 |
| First published | 2015-06-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Known vulnerabilities | 0 (+6 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | zoubin |
| Maintainers | zoubin |
| Keywords | postcss, processor, plugin |

## Links

- npm: https://www.npmjs.com/package/postcss-processor
- Repository: https://github.com/zoubin/postcss-processor
- Homepage: https://github.com/zoubin/postcss-processor#readme
- Issues: https://github.com/zoubin/postcss-processor/issues
- npm.io page: https://npm.io/package/postcss-processor

## Dependencies (2)

- [postcss](https://npm.io/package/postcss.md) ^4.1.11
- [require-array](https://npm.io/package/require-array.md) ^0.1.4

## Recent versions

- 0.1.2 (latest) — 2015-06-18
- 0.1.1 — 2015-06-18
- 0.1.0 — 2015-06-17
- 0.0.1 — 2015-06-17

## README

# postcss-processor
Sugar way to create a postcss processor or get postcss plugins

## Usage

```javascript
var Processor = require("postcss-processor")

var plugins = Processor.plugin(
    ["postcss-node-plugin", "./local-plugin"],
    null,
    { basedir: __dirname + "/plugins" }
)

console.log("Plugins to be used:", plugins.map(function (p) {
    return p.postcssPlugin
}))
// Plugins to be used: [ 'postcss-node-plugin', 'local-plugin'  ]

var processor = Processor(
    ["postcss-node-plugin", "./local-plugin"],
    null,
    { basedir: __dirname + "/plugins" }
)


```

### processor = Processor(pluginNames, opts, resolveOpts)

Resolve the plugins according to `pluginNames`, and return a processor using them.

### plugins = Processor.plugin(pluginNames, opts, resolveOpts)

Resolve the plugins

#### opts

Options map for each plugin. Key is the name, and value is the option.

#### resolveOpts

Type: `Object`

Directly passed to [resolve.sync(id, opts)](https://github.com/substack/node-resolve#resolvesyncid-opts) to resolve the `pluginNames`

Type: `Function`

Used to resolve the `pluginNames`, with signature `resolve(id)`

---
_Source: https://npm.io/package/postcss-processor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
