Created
August 13, 2024 10:25
-
-
Save nsdevaraj/9c6f4e655df40d93c539bab12771ba63 to your computer and use it in GitHub Desktop.
starter
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
if ! command -v npx | |
then | |
echo "npx is required to be installed for this script" | |
exit | |
fi | |
echo "Creating a new project using create-react-app" | |
npx create-react-app $1 | |
cd $1 | |
echo "Adding tailwindcss, postcss and autoprefixer as a dependency" | |
npm add -D tailwindcss postcss autoprefixer | |
npx tailwindcss init -p | |
echo "Configuring valid files glob for tailwindcss.config.js" | |
cat <<EOT > tailwind.config.js | |
module.exports = { | |
content: [ | |
"./src/**/*.{js,jsx,ts,tsx}", | |
], | |
theme: { | |
extend: {}, | |
}, | |
plugins: [], | |
} | |
EOT | |
echo "Configuring src/index.css" | |
cat <<EOT > src/index.css | |
@tailwind base; | |
@tailwind components; | |
@tailwind utilities; | |
EOT | |
sed -i '' 's|<code>|<code className="border-2 border-indigo-500 bg-indigo-900 rounded-xl p-2">|' src/App.js |
npx shadcn-ui@latest init
tsconfig.json
{
"$schema": "https://json.schemastore.org/tsconfig",
"display": "Default",
"compilerOptions": {
"composite": false,
"declaration": true,
"declarationMap": true,
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
"inlineSources": false,
"isolatedModules": true,
"moduleResolution": "node",
"noUnusedLocals": false,
"noUnusedParameters": false,
"preserveWatchOutput": true,
"skipLibCheck": true,
"strict": true
},
"exclude": ["node_modules"]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
npx shadcn-ui@latest add button