# post-sequence

> A sequence for configuration posthtml and postcss plugins

Latest version **0.3.0** (published 2019-08-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install post-sequence
pnpm add post-sequence
yarn add post-sequence
bun add post-sequence
```

## 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.0 |
| Published | 2019-08-19 |
| First published | 2016-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=8 |
| Dependencies | 0 |
| Unpacked size | 26.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Ivan Demidov |
| Maintainers | scrum |
| Keywords | post, HTML, CSS, PostHTML, PostCSS, Package, Plugins, Config, Sequence, Orders, Namespace |

## Links

- npm: https://www.npmjs.com/package/post-sequence
- Repository: https://github.com/scrum/post-sequence
- Homepage: https://scrum/post-sequence#readme
- npm.io page: https://npm.io/package/post-sequence

## Alternatives

- [@tsparticles/shape-image](https://npm.io/package/@tsparticles/shape-image.md) — 303.7K weekly downloads
- [@tsparticles/shape-line](https://npm.io/package/@tsparticles/shape-line.md) — 233.7K weekly downloads
- [stringify-attributes](https://npm.io/package/stringify-attributes.md) — 58.6K weekly downloads
- [mobile-drag-drop](https://npm.io/package/mobile-drag-drop.md) — 46.3K weekly downloads
- [@comunica/actor-rdf-parse-html](https://npm.io/package/@comunica/actor-rdf-parse-html.md) — 29.2K weekly downloads

## Recent versions

- 0.3.0 (latest) — 2019-08-19
- 0.1.12 — 2017-04-03
- 0.1.11 — 2017-03-30
- 0.1.10 — 2016-12-28
- 0.1.9 — 2016-12-12
- 0.1.8 — 2016-11-22
- 0.1.7 — 2016-10-17
- 0.1.6 — 2016-09-12
- 0.1.5 — 2016-08-08
- 0.1.4 — 2016-08-02
- 0.1.3 — 2016-07-25
- 0.1.2 — 2016-07-25
- 0.1.1 — 2016-07-25
- 0.1.0 — 2016-07-05
- 0.0.0 — 2016-07-04

## README

# post-sequence

> Sequence for configuration [posthtml](https://github.com/posthtml) and [postcss](https://github.com/postcss), sorts the configuration file based on the internal configurator.

[![Travis Build Status](https://img.shields.io/travis/post/post-sequence/master.svg?style=flat-square&label=unix)](https://travis-ci.org/post/post-sequence)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/post-sequence/master.svg?style=flat-square&label=windows)](https://ci.appveyor.com/project/post/post-sequence)[![node](https://img.shields.io/node/v/post-sequence.svg?maxAge=2592000&style=flat-square)]()[![npm version](https://img.shields.io/npm/v/post-sequence.svg?style=flat-square)](https://www.npmjs.com/package/post-sequence)[![Dependency Status](https://david-dm.org/post/post-sequence.svg?style=flat-square)](https://david-dm.org/post/post-sequence)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/post/post-sequence.svg?style=flat-square)](https://coveralls.io/r/post/post-sequence)

[![npm downloads](https://img.shields.io/npm/dm/post-sequence.svg?style=flat-square)](https://www.npmjs.com/package/post-sequence)[![npm](https://img.shields.io/npm/dt/post-sequence.svg?style=flat-square)](https://www.npmjs.com/package/post-sequence)[![Package Quality](http://npm.packagequality.com/shield/post-sequence.svg?style=flat-square)](http://packagequality.com/#?package=post-sequence)

## Why?
Saves you from possible errors in the processing due to wrong wiring sequence plug-ins. You just pass in a configuration object of your processor, type of processor and reappointment or extension for internal configurator.

## Install

```bash
$ npm i -S post-sequence
```
> **Note:** This project is compatible with node v8+

## Usage

```js
import sequence from 'post-sequence';

const posthtmlConfig = {
  'posthtml-bem': {
    elemPrefix: '__',
    modPrefix: '-',
    modDlmtr: '--'
  },
  'posthtml-include': {
    root: './',
    encoding: 'utf-8'
  },
  'posthtml-style-to-file': {
    path: './dist/style.css'
  }
};

sequence(posthtmlConfig, {processor: 'posthtml', extend: [2, 'posthtml-style-to-file']});
// Return ==> {"posthtml-include": {...}, "posthtml-style-to-file": {...}, "posthtml-bem": {...}}
```
Returns your config sorted according to the internal configuration or according to the extended.

## posthtml configuration sequence
<img align="left" width="95" height="130" title="PostHTML" src="http://posthtml.github.io/posthtml/logo.svg">

```json
[
  "posthtml-include",
  "posthtml-modules",
  "posthtml-inline-assets",
  "posthtml-inline-css",
  "posthtml-beautify"
]
```

## postcss configuration sequence
<img align="left" width="95" height="95" title="PostCSS" src="http://postcss.github.io/postcss/logo.svg">

```json
[
  "postcss-devtools",
  "postcss-easy-import",
  "postcss-import",
  "postcss-each",
  "postcss-mixins",
  "postcss-at-rules-variables",
  "postcss-custom-properties",
  "postcss-for",
  "postcss-conditionals",
  "postcss-nested",
  "postcss-sorting",
  "postcss-style-guide",
  "postcss-discard-comments",
  "postcss-csso"
]
```

## Options

#### `processor` 
Type: `string<posthtml|postcss>`  
Default: ``  


#### `extend`
Type: `array<array>`  
Default: `[]`  
Value: `[index, ['plugin-name', ...]]`  
*To determine the correct index, see the [config](https://github.com/post/post-sequence/blob/master/src/sequence-config.js)*

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