modular-css-rollup

5.0.0-rc1 • Public • Published

modular-css-rollup NPM Version NPM License NPM Downloads Build Status

modular-css-rollup provides a rollup build plugin you can use to transform imported .css files into lookup objects.

Install

$ npm i modular-css-rollup

Usage

API

rollup({
    entry   : "./index.js",
    plugins : [
        require("modular-css-rollup")({
            css : "./gen/index.css"
        })
    ]
}).then(function(bundle) {
    ...
});

Config file

import css from "modular-css-rollup";

export default {
    entry   : "./index.js",
    dest    : "./gen/bundle.js",
    format  : "umd",
    plugins : [
        css({
            css : "./gen/index.css"
        })
    ]
};

Options

ext

Extension to match on. Defaults to .css. Can be used in place of include/exclude.

include/exclude

A minimatch pattern, or an array of minimatch patterns, relative to process.cwd(). Can be used in place of ext.

css

Location to write the generated CSS file to.

json

Location to write out the JSON mapping file for use in server rendering.

Shared Options

All other options are passed to the underlying Processor instance, see Options.

Package Sidebar

Install

npm i modular-css-rollup@5.0.0-rc1

Version

5.0.0-rc1

License

MIT

Last publish

Collaborators

  • tivac