rollup-plugin-cssthis

0.1.2 • Public • Published

cssthis-rollup

Transform using cssthis-parse, the rules of a css document to template functions.

import cssthis from "cssthis-rollup";
import autoprefixer from "autoprefixer";
 
export default {
    input: "src/index.js",
    output: [{ file: "dist/bundle.js", format: "iife", sourcemap: true }],
    plugins: [
        cssthis({
            extensions : [".this.css"], // default  [".this.css"]
            plugins : [autoprefixer], // default []
            invoke : false // inject dependency cssthis-tag 
        })
    ]
};

Invoke

When defining invoke:true, the dependency cssthis-tag will be injected, the result of this is the possibility of immediately printing the css in the browser.

import style from "./style.this.css";
style("my-tag");// the css will be printed in document.head

Readme

Keywords

none

Package Sidebar

Install

npm i rollup-plugin-cssthis

Weekly Downloads

1

Version

0.1.2

License

ISC

Unpacked Size

18.4 kB

Total Files

7

Last publish

Collaborators

  • uppercod