react-with-styles-interface-css-compiler
Build step package for generating a static css file to support a react-with-styles project built with the react-with-styles CSS interface
Last updated a year ago by noratarano .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install react-with-styles-interface-css-compiler 
SYNC missed versions from official npm registry.

react-with-styles-interface-css-compiler

Compiler for react-with-styles-interface-css that compiles CSS-in-js styles to generate a static CSS file.

Usage

Compile

The styles passed to withStyles in the source code are compiled to static CSS by the compileCSS function shown below. For convenience, a CLI wrapping compileCSS is provided.

Compile via CLI

Compile styles to CSS using the compile-css CLI.

  • Expects a relative or absolute path to the entry point source file of a React application
  • Automatically compiles the source file and its imported dependencies on the fly using the babel configuration present in the project if one exists
  • Outputs a stylesheet.css file containing the compiled CSS in the current working directory
Run the CLI via npm script (preferred):
{
  "scripts": {
    "build:css": "compile-css src/App.jsx"
  }
}
npm run build:css
Run the CLI directly:
./node_modules/.bin/compile-css src/App.jsx

Compile via library function

import compileCSS from 'react-with-styles-interface-css-compiler';

const entryPointFilePath = 'src/App.jsx';
// CSS is the minified CSS output
const CSS = compileCSS(entryPointFilePath);

Current Tags

  • 2.2.0-alpha.1                                ...           alpha (a year ago)
  • 2.2.0                                ...           latest (a year ago)

14 Versions

  • 2.2.0                                ...           a year ago
  • 2.2.0-alpha.1                                ...           a year ago
  • 3.0.0-alpha.5                                ...           a year ago
  • 3.0.0-alpha.4                                ...           a year ago
  • 3.0.0-alpha.3                                ...           a year ago
  • 3.0.0-alpha.2                                ...           a year ago
  • 3.0.0-alpha.1                                ...           a year ago
  • 2.1.0                                ...           a year ago
  • 2.0.0                                ...           2 years ago
  • 1.1.2                                ...           2 years ago
  • 1.1.1                                ...           2 years ago
  • 1.1.0                                ...           3 years ago
  • 1.0.1                                ...           3 years ago
  • 1.0.0                                ...           3 years ago
Downloads
Today 0
This Week 2
This Month 2
Last Day 1
Last Week 14
Last Month 95
Dependencies (9)
Dev Dependencies (16)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |