Thanks to visit codestin.com
Credit goes to github.com

Skip to content

TBS96/TailwindCSS-Tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TailwindCSS setup with Vite, PostCSS, AutoPrefixer:

1. Setup npm:

npm init -y

2. Install & initialize:

npm install -D tailwindcss postcss autoprefixer vite
npx tailwindcss init -p

3. Open tailwind.config.js file & set content as ALL (*):

content: ['*']

4. Create folder CSS & a file within it, as main.css & add the Tailwind directives:

@tailwind base;
@tailwind components;
@tailwind utilities;

5. Link CSS/main.css with index.html

<link rel="stylesheet" href="css/main.css">

6. Open package.json and set the below, under scripts:

"start": "vite"

7. Open terminal & run:

npm run start

To install & use daisyUI:

1. Follow upto 5th step from above.


2. Install daisyUI as a Node package:

npm i -D daisyui@latest

3. Add daisyUI to tailwind.config.js => module.exports => plugins[]:

require('daisyui')

4. Goto package.json => "scripts":{} & add the following:

"dev": "vite"

5. Open terminal & run:

npm run dev

To build for production:

Goto package.json => "scripts":{} & add the following:

"build": "vite build"

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published