# broccoli-multi-postcss

> Broccoli plugin to transform one or more input files using PostCSS to one or more output files.

Latest version **0.3.2** (published 2019-09-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install broccoli-multi-postcss
pnpm add broccoli-multi-postcss
yarn add broccoli-multi-postcss
bun add broccoli-multi-postcss
```

## 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.3.2 |
| Published | 2019-09-09 |
| First published | 2019-09-05 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Node | ^8.16.1 \|\| >= 10.0.0 |
| Dependencies | 5 |
| Unpacked size | 31.1 KB |
| Known vulnerabilities | 0 (+5 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Jan Buschtöns |
| Maintainers | buschtoens |

## Links

- npm: https://www.npmjs.com/package/broccoli-multi-postcss
- Repository: https://github.com/buschtoens/broccoli-multi-postcss
- npm.io page: https://npm.io/package/broccoli-multi-postcss

## Dependencies (5)

- [postcss](https://npm.io/package/postcss.md) ^7.0.18
- [make-dir](https://npm.io/package/make-dir.md) ^3.0.0
- [supports-color](https://npm.io/package/supports-color.md) ^7.0.0
- [recursive-readdir](https://npm.io/package/recursive-readdir.md) ^2.2.2
- [broccoli-multifilter](https://npm.io/package/broccoli-multifilter.md) ^2.0.0

## Recent versions

- 0.3.2 (latest) — 2019-09-09
- 0.3.1 — 2019-09-09
- 0.3.0 — 2019-09-05
- 0.2.1 — 2019-09-05
- 0.2.0 — 2019-09-05
- 0.1.0 — 2019-09-05

## README

# broccoli-multi-postcss

[![Build Status](https://github.com/buschtoens/broccoli-multi-postcss/workflows/Node%20CI/badge.svg)](https://github.com/buschtoens/broccoli-multi-postcss/actions)
[![npm version](https://badge.fury.io/js/broccoli-multi-postcss.svg)](http://badge.fury.io/js/broccoli-multi-postcss)
[![Download Total](https://img.shields.io/npm/dt/broccoli-multi-postcss.svg)](http://badge.fury.io/js/broccoli-multi-postcss)
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![Dependabot enabled](https://img.shields.io/badge/dependabot-enabled-blue.svg?logo=dependabot)](https://dependabot.com/)
[![dependencies Status](https://david-dm.org/buschtoens/broccoli-multi-postcss/status.svg)](https://david-dm.org/buschtoens/broccoli-multi-postcss)
[![devDependencies Status](https://david-dm.org/buschtoens/broccoli-multi-postcss/dev-status.svg)](https://david-dm.org/buschtoens/broccoli-multi-postcss?type=dev)

**Broccoli plugin to transform one or more input files using PostCSS to one or
more output files.**

It's like [`broccoli-postcss`][broccoli-postcss], but allows you consume more
than once input file at once. It also allows you to generate additional
secondary output files.

[broccoli-postcss]: https://github.com/jeffjewiss/broccoli-postcss

## Installation

```
yarn add broccoli-multi-postcss
```

## Usage

```ts
import BroccoliMultiPostCSS from 'broccoli-multi-postcss';
import { plugin } from 'postcss';

const myPlugin = plugin('selector-metadata', options => {
  return (root, result) => {
    const selectors: string[] = [];
    root.walkRules(rule => {
      selectors.push(rule.selector);
    });

    const metadata = { selectors, fileName: result.opts.to };

    result.messages.push({
      type: BroccoliMultiPostCSS.MessageType.WriteFile,
      plugin: 'selector-metadata',
      path: `${result.opts.to}.meta.json`,
      content: JSON.stringify(metadata)
    });
  };
});

const tree = new BroccoliMultiPostCSS(['./styles'], { plugins: [myPlugin] });
```

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