Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

css-to-flow

akameco48MIT0.2.1

create flow from css

css, scss, postcss, flow, flowtype, css-to-flow

readme

css-to-flow

Build Status tested with jest styled with prettier All Contributors

create flow from css

Install

$ npm install css-to-flow

Usage

const cssToFlow = require('css-to-flow')

const css = `
.a { color: red; }
.b:hover, .c::before {
  color: white;
}
.testClass, #id {color: black;}
`

cssToFlow(css)
// => @flow
// => declare export default {|
// =>   +'a': string,
// =>   +'b': string,
// =>   +'c': string,
// =>   +'testClass': string,
// => |}

API

cssToFlow(css)

css

Type: string

css source.

Contributors

Thanks goes to these wonderful people (emoji key):


akameco

💻 📖 ⚠️ 🚇

This project follows the all-contributors specification. Contributions of any kind welcome!

License

MIT © akameco