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 1 year 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 (about 7 years ago)
- Default Branch: master
- Last Pushed: 2021-12-25T13:50:00.000Z (over 4 years ago)
- Last Synced: 2024-10-16T06:33:53.330Z (over 1 year 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
[](https://npmjs.com/package/saber-plugin-critical) [](https://npmjs.com/package/saber-plugin-critical) [](https://circleci.com/gh/egoist/saber-plugin-critical/tree/master) [](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)