Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/tycrek/express-postcss
- Owner: tycrek
- License: isc
- Created: 2021-08-23T16:14:35.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-10-26T22:58:02.000Z (about 1 year ago)
- Last Synced: 2024-11-13T02:21:07.536Z (about 2 months ago)
- Topics: express-middleware, jit, postcss
- Language: TypeScript
- Homepage:
- Size: 541 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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).