15.0.0 • Published 6 years ago

postcss-modular-css v15.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

postcss-modular-css NPM Version NPM License NPM Downloads

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.

15.0.0

6 years ago

14.4.0

6 years ago

14.3.0

6 years ago

14.2.1

6 years ago

14.2.0

6 years ago

14.1.0

6 years ago

14.0.1

6 years ago

14.0.0

6 years ago

13.0.0

6 years ago

12.1.3

6 years ago

12.1.2

6 years ago

12.1.0

6 years ago

12.0.2

6 years ago

12.0.1

6 years ago

12.0.0

6 years ago

11.0.0

6 years ago

10.1.0

6 years ago

10.0.0

6 years ago

9.0.0

6 years ago

8.1.0

6 years ago

8.0.0

6 years ago

7.2.0

6 years ago

7.1.0

6 years ago

7.0.0

6 years ago

6.1.0

7 years ago

6.0.2

7 years ago

6.0.1

7 years ago

6.0.0

7 years ago

5.1.6

7 years ago

5.1.5

7 years ago

5.1.4

7 years ago

5.1.3

7 years ago

5.1.2

7 years ago

5.1.1

7 years ago

5.1.0

7 years ago

5.0.0-rc1

7 years ago

5.0.0-0

7 years ago

4.3.0

7 years ago

4.2.5

7 years ago

4.2.4

7 years ago

4.2.3

7 years ago

4.2.2

7 years ago

4.2.0

7 years ago

4.1.2

7 years ago

4.1.1

7 years ago

4.1.0

7 years ago

4.0.4

7 years ago

4.0.3

7 years ago

4.0.2

7 years ago

4.0.1

7 years ago

4.0.0

7 years ago