Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tycrek/express-postcss

Express.js middleware for on-demand PostCSS compiling
https://github.com/tycrek/express-postcss

express-middleware jit postcss

Last synced: about 1 month ago
JSON representation

Express.js middleware for on-demand PostCSS compiling

Awesome Lists containing this project

README

        

express-postcss
===

[![NPMCBT badge]][NPMCBT link]

*Express.js middleware for on-demand PostCSS compiling*

[NPMCBT badge]: https://img.shields.io/npm/v/@tycrek/express-postcss?color=CB3837&label=%20View%20on%20NPM&logo=npm&style=for-the-badge
[NPMCBT link]: https://www.npmjs.com/package/@tycrek/express-postcss

## Usage

Install with `npm i @tycrek/express-postcss`, then import/require it in your code.

```js
const { epcss } = require('@tycrek/express-postcss');
// or
import { epcss } from '@tycrek/express-postcss';
```

Then, use it as middleware.

```js
app.use('/css', epcss({ /* options */ }));
```

Any requests to `/css` will be handled by the middleware.

For a more complete example, see [test/test.js](test/test.js).