to-tailwind

0.4.0 • Public • Published

Overview

Class convert to Tailwind expression, then you can use Tailwind to develop and no longer need the style files you wrote earlier.

Installation

npm install -g to-tailwind

Usage

<!-- ./test/index.html -->
<body>
  <ul class="list">
    <li class="list-item">foo</li>
    <li class="list-item">bar</li>
  </ul>
</body>
/* ./test/index.css */
.list > .list-item {
  color: red;
}

.list > .list-item:last-of-type {
  color: green;
}

Run

to-tailwind --html ./test/index.html --css ./test/index.css --output ./target

Output file

/* ./target/index.css */
.list > .list-item { 
  @apply text-[red]
}

.list > .list-item:last-of-type {
  @apply last:text-[green]
}

Demo

Click here.

License

MIT

Package Sidebar

Install

npm i to-tailwind

Weekly Downloads

1

Version

0.4.0

License

MIT

Unpacked Size

53.4 kB

Total Files

21

Last publish

Collaborators

  • xnorain001