@poi/plugin-astroturf
Use [astroturf](https://github.com/4Catalyzer/astroturf) to write CSS in JS with zero-runtime.
Last updated 5 months ago by egoist .
MIT · Original npm · Tarball · package.json
$ cnpm install @poi/plugin-astroturf 
SYNC missed versions from official npm registry.

@poi/plugin-astroturf

Use astroturf to write CSS in JS with zero-runtime.

Install

yarn add astroturf @poi/plugin-astroturf --dev

How to use

In your poi.config.js:

module.exports = {
  plugins: [
    {
      resolve: '@poi/plugin-astroturf',
      options: {}
    }
  ]
}

Then write css-in-js:

import { css } from 'astroturf'

const style = css`
  .title {
    font-size: 2em;
  }
`
export const App = () => {
  return <div className={style.title}>Hello world</div>
}

Check out astroturf for more usages.

Options

  • loaderOptions: astroturf/loader options
    • loaderOptions.extension: Default .module.css. You can also change it to .scss or .module.scss etc to use CSS pre-processors, but make sure that it ends with .module.xxx if you want CSS modules support.

License

MIT.

Current Tags

  • 0.1.1-canary.585.f015dbf.0                                ...           canary (a year ago)
  • 0.2.0                                ...           latest (5 months ago)

4 Versions

  • 0.2.0                                ...           5 months ago
  • 0.1.1                                ...           a year ago
  • 0.1.1-canary.585.f015dbf.0                                ...           a year ago
  • 0.1.0                                ...           a year ago
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 1
Dependencies (0)
None
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |