0.0.25 • Published 14 days ago

transform-to-tailwindcss v0.0.25

Weekly downloads
-
License
MIT
Repository
github
Last release
14 days ago

This library is to convert css to tailwindcss. tailwindcss can reuse styles better to reduce the packaging volume, which can be converted as a performance optimization method, and it can also make it easier for old projects to upgrade to tailwindcss. If you want to use unocss, you can use transformToUnocss.

📦 Install

  npm i -g transform-to-tailwindcss

🦄 cli

  ## command: totailwindcss + directory
  totailwindcss playground

  ## revoke: totailwindcss + directory + --revert
  totailwindcss payground --revert

🌈 Usage

// vite.config.ts
import { vitePluginTransformTotailwindcss } from 'transform-to-tailwindcss'
export default defineConfig({
  plugins: [vitePluginTransformTotailwindcss(/* options */)],
})
// rollup.config.js
import { resolve } from 'node:path'
import { rollupTransformTotailwindcss } from 'transform-to-tailwindcss'
export default {
  plugins: [rollupTransformTotailwindcss(/* options */)],
}
// webpack.config.js
module.exports = {
  /* ... */
  plugins: [
    require('transform-to-tailwindcss').webpackTransformTotailwindcss({
      /* options */
    }),
  ],
}
// vue.config.js
module.exports = {
  configureWebpack: {
    plugins: [
      require('transform-to-tailwindcss').webpackTransformTotailwindcss({
        /* options */
      }),
    ],
  },
}
// esbuild.config.js
import { build } from 'esbuild'
import { esbuildTransformTotailwindcss } from 'transform-to-tailwindcss'

build({
  plugins: [esbuildTransformTotailwindcss(/* options */)],
})

⭐ Feature

  • support css in '.html' | '.tsx' | '.vue' | '.astro' | '.svelte' to tailwindcss
  • support sass less stylus convert
  • support vite | rollup | webpack | vue-cli | esbuild
  • vscode extension To tailwindcss

🚁 More

Before

before

After

after

:coffee:

buy me a cup of coffee

License

MIT

0.0.23

14 days ago

0.0.24

14 days ago

0.0.25

14 days ago

0.0.22

30 days ago

0.0.21

2 months ago

0.0.20

2 months ago

0.0.19

3 months ago

0.0.18

4 months ago

0.0.13

6 months ago

0.0.14

6 months ago

0.0.15

6 months ago

0.0.16

6 months ago

0.0.17

6 months ago

0.0.11

7 months ago

0.0.3

12 months ago

0.0.10

9 months ago

0.0.2

12 months ago

0.0.9

9 months ago

0.0.8

11 months ago

0.0.5

11 months ago

0.0.4

11 months ago

0.0.7

11 months ago

0.0.6

11 months ago

0.0.1

12 months ago