59

Tailwind CSS Standalone CLI: Use Tailwind CSS without Node.js

 2 years ago
source link: https://dev.to/kachidk/tailwind-standalone-cli-use-tailwind-css-without-nodejs-2bfn
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Tailwind CSS Standalone CLI: Use Tailwind CSS without Node.js

Tailwind just released a standalone CLI in a self-contained executable, no Node.js or npm required.


Get started

Download the executable for your platform from the latest release.

Copy it to the root directory of your project.

Rename the executable "tailwindcss" .

Now you can use it just like the npm-distributed CLI tool:

# Create a tailwind.config.js file
./tailwindcss init

# Start a watcher
./tailwindcss -i input.css -o output.css --watch

# Compile and minify your CSS for production
./tailwindcss -i input.css -o output.css --minify

Enter fullscreen mode

Exit fullscreen mode

It comes bundled with the latest versions of all of tailwind's first-party plugins, so if you want to use them in your project, just require them in your tailwind.config.js file like you would in a Node-based project:

module.exports = {
  // ...
  plugins: [
    require('@tailwindcss/forms'),
    require('@tailwindcss/typography'),
  ]
}

Enter fullscreen mode

Exit fullscreen mode

Refrences

Standalone CLI: Use Tailwind CSS without Node.js - Adam Wathan


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK