Skip to content

Commit 7250d76

Browse files
committed
spruce up the readme
1 parent 436aa4e commit 7250d76

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
1-
# rollup-plugin-postprocess
1+
# rollup-plugin-postprocess [![npm](https://img.shields.io/npm/v/rollup-plugin-postprocess.svg?style=flat)](https://www.npmjs.org/package/rollup-plugin-postprocess) [![travis](https://travis-ci.org/developit/rollup-plugin-postprocess.svg?branch=master)](https://travis-ci.org/developit/rollup-plugin-postprocess)
22

33
Apply regex find-and-replace postprocessing to your Rollup bundle.
44

5+
56
## Installation
67

78
`npm i -D rollup-plugin-postprocess`
89

10+
911
## Usage
1012

13+
Works just like a [JavaScript String replace](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/replace), including the funtion callback option.
14+
15+
`postprocess()` expects an Array of `[(RexExp) find, (String|Function) replace]` pairs. Alternatively, if a function is provided, it will be invoked for each bundle and can return said pairs.
16+
17+
18+
## Example
19+
1120
```js
1221
import postprocess from 'rollup-plugin-postprocess';
1322

0 commit comments

Comments
 (0)