NPM Package to Automate Installing the Tailwind CSS Preset

NPM Package to Automate Installing the Tailwind CSS Preset

The use-tailwind-preset NPM package by Christopher Pitt is a tiny helper that installs the Tailwind Laravel preset.

When using a Laravel preset, typically, you’d install the composer package, run the preset command, and then remove the package after that. This NPM package will do all that automatically:

  • installs laravel-frontend-presets/tailwindcss
  • runs php artisan preset tailwindcss
  • installs and builds front-end dependencies
  • removes laravel-frontend-presets/tailwindcss

It uses the laravel-frontend-presets/tailwindcss package maintained by our own Michael Dyrynda.

To get started, all you need to do is install this extension. I prefer to install it globally so that it’s always at my fingertips when I need it:

$ laravel new project
$ cd project
$ git init && git add --all
$ git commit -m"First commit"

$ npx use-tailwind-preset

Installing the Tailwind preset...
Installing NPM dependencies...
Done.

Now Tailwind CSS is ready to go in your project!

You can learn more about this package, get full installation instructions, and view the source code on GitHub at assertchris/use-tailwind-preset

Filed in: News
Laravel News Partners

Laravel Jobs

PHP Developer - Full time w/ benefits, US Only
Northern Virginia or Remote (US Only)
Guidance Residential
Full Stack Developer
Remote
Wehaa.com
Laravel API Developer
Las Vegas, NV (Must work on-site)
V Shred
Laravel Developer (Vue, SQL Server)
Remote
World Trade Organization
Web Application Developer (Vue.js & Laravel)
Remote
Apero Creative Development

Newsletter

Join 31,000+ others and never miss out on new tips, tutorials, and more.