abdelhak002 / tailwind-css

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

initializing project

npm init -y

installaion

Note: installing tailwindcss, postcss, postcss-cli, autoprefixer, vite as Dev dependicies.

npm install -D tailwindcss postcss postcss-cli autoprefixer vite

configurations

Note: generating a configuration file for Tailwindcss and postcss

npx tailwindcss init -p 

Tailwindcss compiler

Note: in oreder to get the tailwindcss classes, you have to create a css compile file, and another css file where you store the complie result

toch src/css/app.css
toch src/css/main.css
  • Add the following lines to app.css
   @import 'tailwindcss/base';
   @import 'tailwindcss/components';
   @import 'tailwindcss/utilities';
  • Compling the app.css file to main.css file by runing the following commande
npm run build:css

serve

npm run dev

Note: all commandes are definde in package.json file.

About


Languages

Language:CSS 100.0%Language:HTML 0.0%Language:JavaScript 0.0%