Skip to content

Commit

Permalink
Add clarification on Promise usage in transform
Browse files Browse the repository at this point in the history
  • Loading branch information
simonsmith committed Feb 17, 2016
1 parent 72299c6 commit cbb0aee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,17 @@ Type: `Function`
Default: `null`

A function to transform the content of imported files. Take one argument (file
content) and should return the modified content or promise with it.
content) and should return the modified content or a resolved promise with it.
`undefined` result will be skipped.

```js
transform: function(css) {
return postcss([somePlugin]).process(css).then(function(result) {
return result.css;
});
}
```

#### `plugins`

Type: `Array`
Expand Down

0 comments on commit cbb0aee

Please sign in to comment.