Created
March 4, 2023 05:21
-
-
Save tanishqsh/900ac0944a57c42451df22bd9189c0a2 to your computer and use it in GitHub Desktop.
A bash function to create fresh-new NextJS with Tailwind, with my favourite npm packages
This file contains 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
function freshproject(){ | |
npx create-next-app@latest "$1" --typescript --eslint | |
cd "$1" | |
npm install -D tailwindcss postcss autoprefixer | |
npx tailwindcss init -p | |
truncate -s 0 tailwind.config.js | |
echo "module.exports = { content: ['./app/**/*.{js,ts,jsx,tsx}', './pages/**/*.{js,ts,jsx,tsx}', './components/**/*.{js,ts,jsx,tsx}'], theme: { extend: {},}, plugins: [], };" >> tailwind.config.js | |
truncate -s 0 styles/globals.css | |
echo "@tailwind base;" >> styles/globals.css | |
echo "@tailwind components;" >> styles/globals.css | |
echo "@tailwind base;" >> styles/globals.css | |
npm install framer-motion | |
npm install react-responsive | |
npm install react-hot-toast | |
npm install axios | |
code . | |
npm run dev | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment