Skip to content

nuxt-contrib/declass

Repository files navigation

declass

declass

npm version npm downloads Github Actions Codecov

Statically analyze HTML to detect potential class groupings

Install

Install using npm or yarn:

npm i declass
# or
yarn add declass

Import into your Node.js project:

// CommonJS
const { declass } = require('declass')

// ESM
import { declass } from 'declass'

Usage

declass(html)
[
  "class": "duration-200 group-hover:opacity-100 transition-opacity",
  "uses": [
    "<div class="transition-opacity duration-200 ease-in-out opacity-0 group-hover:opacity-100 absolute top-4 right-6 cursor-pointer" data-v-cc3a34da="">",
    ...
  ],
  ...
]

(see test snapshot)

License

MIT. Made with 💖

About

Analyse HTML to detect CSS class Grouping 🗜️

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages