This package has been deprecated

Author message:

Renamed to @modular-css/postcss

postcss-modular-css

15.0.0 • Public • Published

postcss-modular-css NPM Version NPM License NPM Downloads

Gitter

PostCSS plugin to use modular-css within a PostCSS processor instance.

Install

$ npm i postcss-modular-css

Usage

postcss-modular-css provides a PostCSS plugin that can be used like any other. It will output a message with a type of modular-css-exports containing all the exported class compositions.

API

var postcss   = require("postcss"),
    processor = postcss([
        require("postcss-modular-css")({
            json : "./path/to/output.json"
        })
    ]);
 
processor.process("<css>")
    .then((result) => {
        // result.css
        // result.map
        // result.messages.find((msg) => msg.type === "modular-css-exports")
        // etc
    });

Config

$ postcss --config postcss.json input.css
{
    "output" : "out.css",
    
    "postcss-modular-css": {
        "json" : "./path/to/output.json"
    }
}
 

CLI

$ postcss --use modular-css/postcss input.css

Options

json

Write the class composition data to this location on disk.

Shared Options

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

Package Sidebar

Install

npm i postcss-modular-css

Weekly Downloads

1

Version

15.0.0

License

MIT

Unpacked Size

10.6 kB

Total Files

5

Last publish

Collaborators

  • tivac