Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/egoist/saber-plugin-critical
Inline critical CSS.
https://github.com/egoist/saber-plugin-critical
critical critical-css saber saber-plugin
Last synced: about 2 months ago
JSON representation
Inline critical CSS.
- Host: GitHub
- URL: https://github.com/egoist/saber-plugin-critical
- Owner: egoist
- License: mit
- Created: 2019-04-05T08:32:03.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-12-25T13:50:00.000Z (almost 3 years ago)
- Last Synced: 2024-10-16T06:33:53.330Z (about 2 months ago)
- Topics: critical, critical-css, saber, saber-plugin
- Language: JavaScript
- Size: 173 KB
- Stars: 4
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# saber-plugin-critical
[![NPM version](https://badgen.net/npm/v/saber-plugin-critical)](https://npmjs.com/package/saber-plugin-critical) [![NPM downloads](https://badgen.net/npm/dm/saber-plugin-critical)](https://npmjs.com/package/saber-plugin-critical) [![CircleCI](https://badgen.net/circleci/github/egoist/saber-plugin-critical/master)](https://circleci.com/gh/egoist/saber-plugin-critical/tree/master) [![donate](https://badgen.net/badge/support%20me/donate/ff69b4)](https://patreon.com/egoist)
## Introduction
This plugin extracts & inlines critical-path (above-the-fold) CSS from HTML after `saber generate`, for example if you're using [Tailwind CSS](https://tailwindcss.com) or other CSS frameworks you can use this plugin to remove unused CSS.
## Install
```bash
yarn add saber-plugin-critical --dev
```## Usage
In your `saber-config.yml` (or `.js`, `.toml` etc):
```yml
plugins:
- resolve: saber-plugin-critical
```## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request :D## Author
**saber-plugin-critical** © [EGOIST](https://github.com/egoist), Released under the [MIT](./LICENSE) License.
Authored and maintained by EGOIST with help from contributors ([list](https://github.com/egoist/saber-plugin-critical/contributors)).> [Website](https://egoist.sh) · GitHub [@EGOIST](https://github.com/egoist) · Twitter [@\_egoistlily](https://twitter.com/_egoistlily)