Skip to content

UpperCod/rollup-plugin-cssthis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Transform CSS into template functions by using rollup

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published