From cbb0aeef7afc30f16bae03a8f29fffa4895e0c41 Mon Sep 17 00:00:00 2001 From: Simon Smith Date: Tue, 16 Feb 2016 23:49:26 +0000 Subject: [PATCH] Add clarification on Promise usage in transform --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 17c54638..aebb4ccb 100755 --- a/README.md +++ b/README.md @@ -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`