Last active
June 21, 2022 13:09
-
-
Save wlkns/404030f75bcdf197b6fc1ae178043ace to your computer and use it in GitHub Desktop.
Install vue@latest with tailwind (command/macosx)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
read -p 'Project folder: ' PROJECT | |
npm init vue@latest -- --router --typescript --pinia --eslint-with-prettier $PROJECT | |
cd $PROJECT | |
npm install -D tailwindcss postcss autoprefixer | |
npx tailwindcss init -p | |
cat << EOF > tailwind.config.js | |
/** @type {import('tailwindcss').Config} */ | |
module.exports = { | |
content: [ | |
"./index.html", | |
"./src/**/*.{vue,js,ts,jsx,tsx}", | |
], | |
theme: { | |
extend: {}, | |
}, | |
plugins: [], | |
} | |
EOF | |
cat << EOF > src/styles.css | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
EOF | |
sed -i '' -e 's/const app/import ".\/styles.css"\;\n\nconst app/g' ./src/main.ts |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment