-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathreact.sh
executable file
·68 lines (56 loc) · 1.24 KB
/
react.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env bash
npm install @material-ui/core
npm install @material-ui/icons
npm install -D tailwindcss@npm:@tailwindcss/postcss7-compat postcss autoprefixer
npm install @craco/craco
echo '
⚠️ Do some changes ⚠️
"scripts": {
- "start": "react-scripts start",
- "build": "react-scripts build",
- "test": "react-scripts test",
+ "start": "craco start",
+ "build": "craco build",
+ "test": "craco test",
"eject": "react-scripts eject"
}, '
>craco.config.js
touch craco.config.js
# For moving content in the file
cat <<EOF >>craco.config.js
// craco.config.js
module.exports = {
style: {
postcss: {
plugins: [
require('tailwindcss'),
require('autoprefixer'),
],
},
},
}
EOF
npx tailwindcss init
>tailwind.config.js
cat <<EOF >>tailwind.config.js
// tailwind.config.js
module.exports = {
purge: ['./src/**/*.{js,jsx,ts,tsx}', './public/index.html'],
darkMode: false, // or 'media' or 'class'
theme: {
extend: {},
},
variants: {
extend: {},
},
plugins: [],
}
EOF
>./src/index.css #for emptying the file
cat <<EOF >>./src/index.css
/* ./src/index.css */
@tailwind base;
@tailwind components;
@tailwind utilities;
EOF
echo "all done"