Skip to content

Instantly share code, notes, and snippets.

@wlkns
Last active June 21, 2022 13:09
Show Gist options
  • Save wlkns/404030f75bcdf197b6fc1ae178043ace to your computer and use it in GitHub Desktop.
Save wlkns/404030f75bcdf197b6fc1ae178043ace to your computer and use it in GitHub Desktop.
Install vue@latest with tailwind (command/macosx)
#!/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