0.1.0 • Published 8 years ago

pull-css v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
8 years ago

pull-css NPM version Build Status

Parse CSS into ASTs through a pull stream, or vice versa.

pull(
  source(),
  css(), // parse source as CSS
  // ...
)

Installation

$ npm install --save pull-css

API

css(options)

Parse a pull-stream source with css

  • options (Object): Options passed to css.parse

Returns a through stream that pulls tokens.

pull(
  pull.values([
    'div { color: red }'
  ]),
  css(),
  // ...
)

css.stringify(options)

Stringify a pull-stream source that is a css AST (probably originating from css())

Returns a through pull stream that pulls strings.

pull(
  pull.values([
    'div { color: red }'
  ]),
  css(),
  // do transformations on ast...
  // then serialize:
  css.serialize(),
  // ...
)

License

MIT © Jamen Marz