-
Notifications
You must be signed in to change notification settings - Fork 5
/
run.sh
35 lines (30 loc) · 766 Bytes
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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