webtourismus/tailwindcss-cli

Standalone binary CLI executable of Tailwind CSS for Linux x64 systems. Patched version including postcss-import and postcss-nested.

v3.4.10 2024-08-30 13:18 UTC

This package is auto-updated.

Last update: 2024-11-30 14:01:51 UTC


README

This is a patched version of the standalone CLI build of Tailwind CSS for Linux x64 systems, easily installable as a composer package. Contrary to the default CLI, this patched version also includes postcss-import and postcss-nested bundled inside the CLI executable.

  1. Install with composer require webtourismus/tailwindcss-cli
  2. Execute with ./vendor/bin/tailwindcss
  3. (optional) If you want to use import and/or nesting in your CSS source file, use the --postcss parameter to specify your PostCSS config file.

Usage example:

./vendor/bin/tailwindcss --input my_tailwind_source.css --output my_compiled_tailwind.css --content my_site/*.html --postcss my_custom_postcss.config.css

Example postcss.config.js file with import and nesting enabled:

module.exports = {
  plugins: {
    'postcss-import': {},
    'tailwindcss/nesting': {},
     tailwindcss: {},
     autoprefixer: {},
  }
}

See tailwindcss.com/blog/standalone-cli for more instructions.
See tailwindcss.com/docs/using-with-preprocessors for PostCSS options.