tailwind-bundle

1.0.1 • Public • Published

Usually, Tailwind should be built on the fly. But sometimes, you need to bundle it up and save it.

To install:

npm install tailwind-bundle --save

And the paramaters are:

tailwind(html, config, tailwindConfig)

Here's som examples:

const tailwind = require('tailwind-bundle');

const tailwindConfig = { ... }; // This is the config https://tailwindcss.com/docs/configuration (content is ignored)

tailwind('<div class="bg-blue-300"></div>', { selector: '.test' }, tailwindConfig).then(r => console.log(r.css));

Or you can await using:

await tailwind('<div class="bg-blue-300"></div>', { selector: '.test' }, tailwindConfig);

Here's the config options:

  • selector Prefix each generated selector with this, for the sake of scoping (default: '')
  • includeBase This will include @tailwind base, which resets a lot of CSS (default: false)

Readme

Keywords

none

Package Sidebar

Install

npm i tailwind-bundle

Weekly Downloads

1

Version

1.0.1

License

ISC

Unpacked Size

1.88 kB

Total Files

3

Last publish

Collaborators

  • gkoberger