mkdir $1
cd $1
npm init
mkdir public
mkdir src
npm install -D tailwindcss
npx tailwindcss init
cat << EOF > tailwind.config.js
/** @type {import('tailwindcss').Config} /
module.exports = {
content: ["./public/**/.{html,js}"],
theme: {
extend: {},
},
plugins: [],
};
EOF
cat << EOF > src/style.css
@tailwind base;
@tailwind components;
@tailwind utilities;
EOF
npx tailwindcss -i ./src/style.css -o ./public/style.css
cat << EOF > pakage.json
{
"name": "testcss",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"devDependencies": {
"tailwindcss": "^3.2.0"
},
"scripts": {
"build": "npx tailwindcss -i ./src/style.css -o ./public/style.css",
"watch": "npx tailwindcss -i ./src/style.css -o ./public/style.css --watch"
}
}
EOF
More than 1 year has passed since last update.
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme