Parse CSS into ASTs through a pull stream, or vice versa.
pull(
source(),
css(), // parse source as CSS
// ...
)
$ npm install --save pull-css
Parse a pull-stream source with css
options
(Object
): Options passed tocss.parse
Returns a through
stream that pulls tokens.
pull(
pull.values([
'div { color: red }'
]),
css(),
// ...
)
Stringify a pull-stream source that is a css
AST (probably originating from css()
)
options
(Object
): Options passed tocss.stringify
Returns a through
pull stream that pulls strings.
pull(
pull.values([
'div { color: red }'
]),
css(),
// do transformations on ast...
// then serialize:
css.serialize(),
// ...
)
MIT © Jamen Marz