29.0.3 • Published 6 months ago

@modular-css/postcss v29.0.3

Weekly downloads
15
License
MIT
Repository
github
Last release
6 months ago

@modular-css/postcss NPM Version NPM License NPM Downloads

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

Install

> npm i @modular-css/postcss postcss

Usage

@modular-css/postcss 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

const postcss = require("postcss");
const processor = postcss([
    require("@modular-css/postcss")({
        json : "./path/to/output.json"
    })
]);

const result = await processor.process("<css>")

// result.css
// result.map
// result.messages.find((msg) => msg.type === "modular-css-exports")
// etc

Config

> postcss --config postcss.json input.css
{
    "output" : "out.css",
    
    "@modular-css/postcss": {
        "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.

29.0.1

9 months ago

29.0.2

7 months ago

29.0.3

6 months ago

29.0.0

1 year ago

28.1.5

1 year ago

28.1.4

2 years ago

28.1.3

2 years ago

28.0.0

2 years ago

27.1.0

2 years ago

27.0.3

2 years ago

27.0.2

3 years ago

27.0.1

3 years ago

27.0.0

3 years ago

26.0.0

3 years ago

25.8.2

4 years ago

25.8.0

4 years ago

25.7.0

4 years ago

25.6.0

4 years ago

25.5.0

4 years ago

25.4.1

4 years ago

25.4.0

4 years ago

25.3.1

4 years ago

25.2.0

5 years ago

25.1.0

5 years ago

25.0.0

5 years ago

24.2.2

5 years ago

24.2.1

5 years ago

24.2.0

5 years ago

24.1.0

5 years ago

24.0.1

5 years ago

24.0.0

5 years ago

23.0.4

5 years ago

23.0.0

5 years ago

22.1.4

5 years ago

22.1.2

5 years ago

22.1.0

5 years ago

22.0.1

5 years ago

22.0.0

5 years ago

21.2.0

5 years ago

21.1.1

5 years ago

21.0.0

5 years ago

20.0.0

5 years ago

19.1.0

5 years ago

19.0.0

5 years ago

18.0.0

5 years ago

17.1.2

5 years ago

17.1.1

5 years ago

17.0.0

6 years ago

16.2.0

6 years ago

16.1.0

6 years ago

16.0.0

6 years ago