node_modules | ||
src | ||
package.json | ||
README.md | ||
tailwind.config.js | ||
yarn.lock |
Smatchit Tailwind Project with DaisyUI
Setup Instructions
-
Create and Initialize Project:
cd /your_workspace_path mkdir smatchit_tailwind_project cd smatchit_tailwind_project yarn init -y
-
Install Tailwind CSS and DaisyUI:
yarn add tailwindcss daisyui npx tailwindcss init
-
Configure Tailwind CSS and DaisyUI: Edit
tailwind.config.js
:module.exports = { content: [ "/smatchit/wwws/admin/*.html" ], theme: { extend: {}, }, plugins: [require('daisyui')], }
-
Create Tailwind CSS File:
mkdir -p /smatchit/wwws/admin/static/css echo "@tailwind base; @tailwind components; @tailwind utilities; @import 'daisyui';" > /smatchit/wwws/admin/static/css/smatchittailwind.css
-
Build Tailwind CSS: Add script to
package.json
:{ "scripts": { "build:css": "tailwindcss -i /smatchit/wwws/admin/static/css/smatchittailwind.css -o /smatchit/wwws/admin/static/css/smatchittailwind.css" } }
Run the build script:
yarn build:css
Usage
- Link the generated CSS file in your HTML:
<link href="static/css/smatchittailwind.css" rel="stylesheet">