Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kwaa/hexo-lightningcss
⚡️ LightningCSS Plugin for Hexo
https://github.com/kwaa/hexo-lightningcss
hexo hexo-filter hexo-plugin lightningcss
Last synced: 16 days ago
JSON representation
⚡️ LightningCSS Plugin for Hexo
- Host: GitHub
- URL: https://github.com/kwaa/hexo-lightningcss
- Owner: kwaa
- License: wtfpl
- Created: 2022-10-15T15:10:09.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-24T15:12:35.000Z (almost 2 years ago)
- Last Synced: 2024-04-23T20:53:59.037Z (8 months ago)
- Topics: hexo, hexo-filter, hexo-plugin, lightningcss
- Language: TypeScript
- Homepage: https://npmjs.com/package/hexo-lightningcss
- Size: 57.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: COPYING
Awesome Lists containing this project
README
# hexo-lightningcss
⚡️ [LightningCSS](https://github.com/parcel-bundler/lightningcss) Plugin for [Hexo](https://github.com/hexojs/hexo)
## Install
```bash
npm i hexo-lightningcss # npm
# pnpm add hexo-lightningcss # pnpm
# yarn add hexo-lightningcss # yarn
```## Config
```ts
/** @see {@link https://github.com/parcel-bundler/lightningcss/blob/master/node/index.d.ts} */
export type HexoLightningCSSConfig = Omit<
TransformOptions,
'filename' | 'code'
> & {
/**
* Browserslist.
* @see {@link https://github.com/browserslist/browserslist/blob/main/index.d.ts}
*/
browserslist?: string | string[]
/**
* Exclude files.
* @remarks If using an array, run as `new RegExp(arr[0], arr[1])`
* @defaultValue `['min.css']`
*/
exclude?: (string | [string, string])[]
}
```Write into `_config.yml` to override default value.
```yaml
lightningcss:
browserslist:
- defaults and supports es6-module
- maintained node versions
exclude:
- min.css
```### Migrating from [`hexo-autoprefixer`](https://npmjs.com/package/hexo-autoprefixer)
This plugin is compatible with hexo-autoprefixer configuration, no changes are needed.
But if you want, you can also change to the new format:
```diff
- autoprefixer:
+ lightningcss:
exclude:
- '*.min.css'
- browsers:
+ browserslist:
- 'last 2 versions'
```Browserlist may need to be put into a configuration file `_config.yml`, not `package.json` or `.browserslistrc`.
## License
Licensed under the [WTFPL](http://www.wtfpl.net), See the [COPYING](COPYING) file for more details.