Skip to content

thedevopszone/simple-tailwind-starter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Tailwind Starter

This is a simple Tailwind starter project using the Tailwind CLI. It is meant to be used as a starting point for your projects. This is the same setup used in my Tailwind From Scratch Course.

Usage

Clone the repo:

git clone

Install the dependencies:

npm install

Build or watch the CSS file:

# Build once
npm run build

# Watch for changes
npm run watch

DEMO

npm init -y

cat package.json

# For development
npm -i -D tailwindcss

# For Production
npm -i tailwindcss

npx tailwindcss init
vi tailwind.config.js
content: ['./*.html']

touch input.css
vi input.css
@tailwind base;
@tailwind components;
@tailwind utilities;

vi package.json
"scripts": {
  "build": "tailwindcss -i ./input.css -o ./css/style.css",
  "watch": "tailwindcss -i ./input.css -o ./css/style.css --watch"
  
}



npm run build


vi index.html
! enter


link enter   # css/style.css
<title>Document</title>

#In body
h1.text-xl enter


npm run watch

This will watch the src/input.css file and build it to css/style.css, which will be your final CSS file.

License

This project is open source and available under the MIT License.

About

Very simple file structure for Tailwind projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • HTML 73.9%
  • JavaScript 16.0%
  • CSS 10.1%