transform-to-unocss
v0.0.89
Published
The tool that transform css to unocss
Downloads
107
Readme
📦 Install
npm i -g transform-to-unocss
🦄 cli
## command: tounocss + directory
tounocss playground
## revoke: tounocss + directory + --revert
tounocss payground --revert
🌈 Usage
// vite.config.ts
import { viteTransformToUnocss } from 'transform-to-unocss'
export default defineConfig({
plugins: [viteTransformToUnocss(/* options */)],
})
// rollup.config.js
import { resolve } from 'node:path'
import { rollupTransformToUnocss } from 'transform-to-unocss'
export default {
plugins: [rollupTransformToUnocss(/* options */)],
}
// webpack.config.js
module.exports = {
/* ... */
plugins: [
require('transform-to-unocss').webpackTransformToUnocss({
/* options */
}),
],
}
// vue.config.js
module.exports = {
configureWebpack: {
plugins: [
require('transform-to-unocss').webpackTransformToUnocss({
/* options */
}),
],
},
}
// esbuild.config.js
import { build } from 'esbuild'
import { esbuildTransformToUnocss } from 'transform-to-unocss'
build({
plugins: [esbuildTransformToUnocss(/* options */)],
})
⭐ Feature
- support css in '.html' | '.tsx' | '.vue' | '.astro' | '.svelte' to unocss
- support sass less stylus convert
- support vite | rollup | webpack | vue-cli | esbuild
- vscode extension To Unocss
🚁 More
- transform-to-unocss-core - Provides the ability to convert css to unocss on the browser side