tailwind-install 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -0
- package/bin/index.js +58 -0
- package/package.json +18 -0
package/README.md
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# 🚀 Tailwind Install CLI
|
|
2
|
+
|
|
3
|
+
Professional Tailwind CSS installer CLI for modern projects.
|
|
4
|
+
|
|
5
|
+
Automatically installs and configures Tailwind CSS v4 in seconds.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
# ✨ Features
|
|
10
|
+
|
|
11
|
+
- ⚡ Tailwind CSS v4 Setup
|
|
12
|
+
- 🎨 Beautiful CLI Output
|
|
13
|
+
- 🔍 React Detection
|
|
14
|
+
- 🧩 Component Generator
|
|
15
|
+
- 🛠 Tailwind Config Auto Setup
|
|
16
|
+
- 📦 PostCSS Configuration
|
|
17
|
+
- 📁 Auto Folder Creation
|
|
18
|
+
- 🚀 Fast & Simple
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
# 📦 Installation
|
|
23
|
+
|
|
24
|
+
## Using npx
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
npx tailwind-install
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
## Global Install
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npm install -g tailwind-install
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Run:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
tailwind-install
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
# 🚀 Usage
|
|
45
|
+
|
|
46
|
+
## Initialize Tailwind
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
tailwind-install
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Generate Component
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
tailwind-install component Button
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
# 📁 Generated Files
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
src/
|
|
64
|
+
└── index.css
|
|
65
|
+
|
|
66
|
+
tailwind.config.js
|
|
67
|
+
postcss.config.js
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
---
|
|
71
|
+
|
|
72
|
+
# 🎨 Tailwind CSS v4
|
|
73
|
+
|
|
74
|
+
Generated CSS:
|
|
75
|
+
|
|
76
|
+
```css
|
|
77
|
+
@import "tailwindcss";
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
# 🧩 Example Component
|
|
83
|
+
|
|
84
|
+
```jsx
|
|
85
|
+
export default function Button() {
|
|
86
|
+
return (
|
|
87
|
+
<button className="bg-black text-white px-4 py-2 rounded-xl">
|
|
88
|
+
Button
|
|
89
|
+
</button>
|
|
90
|
+
);
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
---
|
|
95
|
+
|
|
96
|
+
# 🛠 Tech Stack
|
|
97
|
+
|
|
98
|
+
- Node.js
|
|
99
|
+
- Tailwind CSS
|
|
100
|
+
- PostCSS
|
|
101
|
+
- Chalk
|
|
102
|
+
- Ora
|
|
103
|
+
- Commander
|
|
104
|
+
- Inquirer
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
# 📌 Requirements
|
|
109
|
+
|
|
110
|
+
- Node.js v18+
|
|
111
|
+
- npm v9+
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
# 👨💻 Author
|
|
117
|
+
|
|
118
|
+
BHOI DIXITBHAI
|
|
119
|
+
|
|
120
|
+
---
|
|
121
|
+
|
|
122
|
+
# ⭐ Support
|
|
123
|
+
|
|
124
|
+
If you like this project, give it a star on GitHub ⭐
|
package/bin/index.js
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const { execSync } = require("child_process");
|
|
4
|
+
const fs = require("fs");
|
|
5
|
+
|
|
6
|
+
console.log("🚀 Installing Tailwind CSS...");
|
|
7
|
+
|
|
8
|
+
execSync(
|
|
9
|
+
"npm install -D tailwindcss @tailwindcss/postcss postcss",
|
|
10
|
+
{ stdio: "inherit" }
|
|
11
|
+
);
|
|
12
|
+
|
|
13
|
+
console.log("⚡ Creating Tailwind config...");
|
|
14
|
+
|
|
15
|
+
const tailwindConfig = `
|
|
16
|
+
module.exports = {
|
|
17
|
+
content: [
|
|
18
|
+
"./src/**/*.{js,jsx,ts,tsx}",
|
|
19
|
+
],
|
|
20
|
+
theme: {
|
|
21
|
+
extend: {},
|
|
22
|
+
},
|
|
23
|
+
plugins: [],
|
|
24
|
+
}
|
|
25
|
+
`;
|
|
26
|
+
|
|
27
|
+
fs.writeFileSync(
|
|
28
|
+
"./tailwind.config.js",
|
|
29
|
+
tailwindConfig
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const postcssConfig = `
|
|
33
|
+
module.exports = {
|
|
34
|
+
plugins: {
|
|
35
|
+
"@tailwindcss/postcss": {},
|
|
36
|
+
},
|
|
37
|
+
}
|
|
38
|
+
`;
|
|
39
|
+
|
|
40
|
+
fs.writeFileSync(
|
|
41
|
+
"./postcss.config.js",
|
|
42
|
+
postcssConfig
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
if (!fs.existsSync("./src")) {
|
|
46
|
+
fs.mkdirSync("./src");
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
const cssContent = `
|
|
50
|
+
@import "tailwindcss";
|
|
51
|
+
`;
|
|
52
|
+
|
|
53
|
+
fs.writeFileSync(
|
|
54
|
+
"./src/index.css",
|
|
55
|
+
cssContent
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
console.log("✅ Tailwind v4 Setup Complete!");
|
package/package.json
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tailwind-install",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Automatic Tailwind CSS Setup CLI",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"bin": {
|
|
7
|
+
"tailwind-install": "./bin/index.js"
|
|
8
|
+
},
|
|
9
|
+
"scripts": {
|
|
10
|
+
"test": "module"
|
|
11
|
+
},
|
|
12
|
+
"keywords": ["tailwind",
|
|
13
|
+
"tailwindcss",
|
|
14
|
+
"cli"],
|
|
15
|
+
"author": "BHOI DIXITBHAI",
|
|
16
|
+
"license": "MIT",
|
|
17
|
+
"type": "commonjs"
|
|
18
|
+
}
|