dolphincss 1.3.1 → 1.3.2
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 +202 -103
- package/bin/dolphin-exit.js +86 -0
- package/bin/dolphin.js +453 -0
- package/bin/watcher.js +121 -0
- package/core-templates/dolphin-button.html +19 -0
- package/core-templates/dolphin-card.html +1 -0
- package/core-templates/dolphin-form-standard.html +1 -0
- package/core-templates/dolphin-modal.html +5 -0
- package/core-templates/dolphin-navbar.html +1 -0
- package/dist/assets/main-Ceq0_-ZS.css +1 -0
- package/dist/index.html +10 -2
- package/dist/index.js +8 -113
- package/dolphin-css.css +1 -1
- package/dolphincss-plugin.cjs +62 -0
- package/marker.json +42 -0
- package/package.json +71 -61
- package/vite-plugin.js +362 -53
- package/dist/assets/css-BcpnIGsX.css +0 -1
- package/dist/assets/main-tn0RQdqM.css +0 -0
- package/scripts/components.js +0 -388
- package/scripts/dolphin-watch.js +0 -53
- package/scripts/setup-snippets.cjs +0 -44
package/README.md
CHANGED
|
@@ -1,120 +1,219 @@
|
|
|
1
|
-
<div align="center">
|
|
2
|
-
<h1
|
|
3
|
-
<p><strong>A Next-Generation UI Library for React + TailwindCSS</strong></p>
|
|
4
|
-
<p><em>Where Magic Component Generation meets Beautiful Global Classes.</em></p>
|
|
5
|
-
</div>
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
DolphinCSS is not just another CSS framework. It fundamentally reimagines how developers build UI by combining the extreme customizability of **TailwindCSS**, the simplicity of **Bootstrap's Global Classes**, and an unprecedented **Vite-powered Magic Component Generator**.
|
|
10
|
-
|
|
11
|
-
Say goodbye to heavy vendor lock-ins (MUI, AntD) and tedious CLI commands (Shadcn UI).
|
|
1
|
+
<div align="center">
|
|
2
|
+
<h1>=�ɼ DolphinCSS</h1>
|
|
3
|
+
<p><strong>A Next-Generation UI Library for React + TailwindCSS</strong></p>
|
|
4
|
+
<p><em>Where Magic Component Generation meets Beautiful Global Classes.</em></p>
|
|
5
|
+
</div>
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
DolphinCSS is not just another CSS framework. It fundamentally reimagines how developers build UI by combining the extreme customizability of **TailwindCSS**, the simplicity of **Bootstrap's Global Classes**, and an unprecedented **Vite-powered Magic Component Generator**.
|
|
10
|
+
|
|
11
|
+
Say goodbye to heavy vendor lock-ins (MUI, AntD) and tedious CLI commands (Shadcn UI).
|
|
12
|
+
|
|
13
|
+
## G�� The 4 Unique Superpowers
|
|
14
|
+
|
|
15
|
+
### 1. =��� Magic Component Generation (Zero CLI)
|
|
16
|
+
We loved the idea of Shadcn giving you ownership of the code, but hated running CLI commands for every single component.
|
|
17
|
+
|
|
18
|
+
With DolphinCSS, **you never touch the terminal.** Just type a magic class in your editor and save:
|
|
19
|
+
|
|
20
|
+
```jsx
|
|
21
|
+
// 1. You type this in your App.jsx:
|
|
22
|
+
<div className="dolphin-card"></div>
|
|
23
|
+
|
|
24
|
+
// 2. You hit Save (Ctrl+S)
|
|
25
|
+
|
|
26
|
+
// 3. =��� MAGIC! Vite instantly replaces that line IN YOUR FILE with the full React Component code!
|
|
27
|
+
<div className="glass card p-6 border border-white/20 rounded-2xl max-w-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 relative overflow-hidden" style={{ backdropFilter: 'blur(20px)' }}>
|
|
28
|
+
{/* Full customizable code is now YOURS */}
|
|
29
|
+
</div>
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### 2. =�Ŀ High-Level Global Classes
|
|
33
|
+
Tired of writing 20 utility classes for a single button? DolphinCSS brings back the simplicity of Global Classes, but with breathtaking modern aesthetics (Glassmorphism, Neon Glows).
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
/* The Tailwind Way (Messy) */
|
|
37
|
+
<button className="px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white font-bold rounded-lg shadow-lg shadow-blue-500/50 transition-all">
|
|
38
|
+
Click
|
|
39
|
+
</button>
|
|
40
|
+
|
|
41
|
+
/* The DolphinCSS Way (Clean & Global) */
|
|
42
|
+
<button className="filled primary-500 glow btn-lg">
|
|
43
|
+
Click
|
|
44
|
+
</button>
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### 3. =��� Infinite Class Composability (Nesting)
|
|
48
|
+
Classes in DolphinCSS are designed to stack perfectly. Combine background colors, gradients, glows, and animations endlessly without conflicts!
|
|
49
|
+
|
|
50
|
+
```jsx
|
|
51
|
+
// Combine classes to create complex, animated, glowing UI instantly:
|
|
52
|
+
<button className="filled success gradient glow glow-pulse rounded-full">
|
|
53
|
+
I am a Glowing, Pulsing, Gradient Green Button!
|
|
54
|
+
</button>
|
|
55
|
+
|
|
56
|
+
// Create a frosted glass overlay with a dark tint:
|
|
57
|
+
<div className="overlay overlay-blur-xl overlay-dark-50"></div>
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### 4. =�ļ World-Class Built-in Animations
|
|
61
|
+
No need for `framer-motion` or `animate.css`. DolphinCSS ships with a complete `@layer utilities` animation engine that you can drop on any HTML element.
|
|
62
|
+
|
|
63
|
+
- **Continuous:** `float`, `spin-slow`, `pulse`, `bounce`, `shimmer`, `gradient-flow`, `neon-flicker`
|
|
64
|
+
- **Hover:** `hover-pulse`, `hover-jelly`, `hover-glow`, `hover-ripple`
|
|
65
|
+
- **Entrance:** `fade-in`, `slide-up`, `zoom-in`, `rotate-3d`
|
|
66
|
+
- **Controls:** `delay-200`, `duration-500`
|
|
67
|
+
|
|
68
|
+
```jsx
|
|
69
|
+
<img src="logo.png" className="float hover-jelly fade-in delay-200" />
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## =��� Installation & Setup
|
|
75
|
+
|
|
76
|
+
1. **Install via npm:**
|
|
77
|
+
```bash
|
|
78
|
+
npm install tailwindcss @tailwindcss/vite dolphincss lucide-react
|
|
79
|
+
```
|
|
80
|
+
*(Note: `lucide-react` is required because the generated magic components use these beautiful icons by default.)*
|
|
81
|
+
|
|
82
|
+
2. **Add the Plugins:** (In `vite.config.js`)
|
|
83
|
+
```javascript
|
|
84
|
+
import { defineConfig } from 'vite'
|
|
85
|
+
import react from '@vitejs/plugin-react'
|
|
86
|
+
import tailwindcss from '@tailwindcss/vite'
|
|
87
|
+
import dolphincssPlugin from 'dolphincss/vite-plugin'
|
|
88
|
+
|
|
89
|
+
export default defineConfig({
|
|
90
|
+
plugins: [react(), tailwindcss(), dolphincssPlugin()]
|
|
91
|
+
})
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
3. **Import Styles:** (In your main `main.jsx` or `index.css`)
|
|
95
|
+
```javascript
|
|
96
|
+
import 'dolphincss/dolphin-css.css';
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## =�ɼ Available Magic Components
|
|
102
|
+
|
|
103
|
+
Type any of these magic markers in your `.jsx` or `.tsx` file, hit save, and watch the code generate instantly:
|
|
104
|
+
|
|
105
|
+
- `<div className="dolphin-form-floating"></div>` (Beautiful Floating Label Form)
|
|
106
|
+
- `<div className="dolphin-form-standard"></div>` (Minimalist Standard Label Form)
|
|
107
|
+
- `<div className="dolphin-table"></div>` (Responsive Data Table)
|
|
108
|
+
- `<div className="dolphin-toast"></div>` (Notification Toast)
|
|
109
|
+
- `<div className="dolphin-modal"></div>` (Native HTML Dialog Modal)
|
|
110
|
+
- `<div className="dolphin-button"></div>` (Button Variants Showcase)
|
|
111
|
+
- `<div className="dolphin-card"></div>` (Glassmorphic Profile Card)
|
|
112
|
+
- `<div className="dolphin-grid"></div>` (Responsive Product/Car Grid)
|
|
113
|
+
- `<div className="dolphin-navbar"></div>` (Sleek Navigation Bar)
|
|
114
|
+
- `<div className="dolphin-header"></div>` (Modern Header/Navbar)
|
|
115
|
+
- `<div className="dolphin-footer"></div>` (Premium Footer Section)
|
|
116
|
+
- `<div className="dolphin-alert"></div>` (Modern Alert Box)
|
|
117
|
+
- `<div className="dolphin-badge"></div>` (Status Badges)
|
|
118
|
+
|
|
119
|
+
- <div className="dolphin-hero"></div> (Stunning Landing Page Hero)
|
|
120
|
+
- <div className="dolphin-pricing"></div> (Premium Pricing Tables)
|
|
121
|
+
- <div className="dolphin-timeline"></div> (Vertical Activity Timeline)
|
|
122
|
+
- <div className="dolphin-chat"></div> (Modern Messaging Interface)
|
|
123
|
+
- <div className="dolphin-carousel"></div> (Interactive Image Slider)
|
|
124
|
+
- <div className="dolphin-dropzone"></div> (Drag & Drop File Upload)
|
|
125
|
+
- <div className="dolphin-rating"></div> (Interactive 5-Star Rating)
|
|
126
|
+
- <div className="dolphin-steps"></div> (Progress Stepper)
|
|
127
|
+
- <div className="dolphin-pagination"></div> (Page Navigation Controls)
|
|
128
|
+
- <div className="dolphin-drawer"></div> (Off-canvas Glass Sidebar)
|
|
129
|
+
- <div className="dolphin-breadcrumbs"></div> (Navigation Trail)
|
|
130
|
+
|
|
131
|
+
## ?? The Power of Variants (x-*)
|
|
132
|
+
|
|
133
|
+
DolphinCSS ships with world-class, pre-built global variants. Instead of writing 15 Tailwind utility classes to create a glassmorphism effect, just use one class!
|
|
134
|
+
|
|
135
|
+
### ?? Premium Effects
|
|
136
|
+
Combine these on any div, card, or container:
|
|
137
|
+
- x-glass (Classic Frosted Glass)
|
|
138
|
+
- x-crystal (Ultra-clear Crystal Border)
|
|
139
|
+
- x-neon (Cyberpunk Neon Glow)
|
|
140
|
+
- x-holo (Holographic Matrix)
|
|
141
|
+
- x-flare (Solar Flare Gradient)
|
|
142
|
+
- x-cyber (Cyberpunk Aesthetic)
|
|
143
|
+
- x-nebula (Galactic Nebula Depth)
|
|
144
|
+
- x-metal (Liquid Mercury)
|
|
145
|
+
- x-aurora (Frosted Aurora)
|
|
146
|
+
- x-float (Quantum Float on Hover)
|
|
147
|
+
|
|
148
|
+
### ?? Advanced Glows & Animations
|
|
149
|
+
Bring your UI to life instantly:
|
|
150
|
+
- glow (Standard Hover Glow)
|
|
151
|
+
- glow pulse (Continuous Pulsing Glow)
|
|
152
|
+
- glow wave (Ocean Wave Animation)
|
|
153
|
+
|
|
154
|
+
### ?? Global Colors & Buttons
|
|
155
|
+
Propagate theme colors cleanly:
|
|
156
|
+
`jsx
|
|
157
|
+
<button className="filled primary px-6 py-2 glow wave">Primary Action</button>
|
|
158
|
+
<button className="outlined success px-6 py-2">Success Outline</button>
|
|
159
|
+
<button className="plain danger px-6 py-2">Danger Plain</button>
|
|
160
|
+
|
|
161
|
+
{/* Perfect Circle Icons */}
|
|
162
|
+
<button className="circle lg fx-aurora glow wave">
|
|
163
|
+
<Icon />
|
|
164
|
+
</button>
|
|
165
|
+
`
|
|
12
166
|
|
|
13
|
-
## ✨ The 4 Unique Superpowers
|
|
14
167
|
|
|
15
|
-
|
|
16
|
-
We loved the idea of Shadcn giving you ownership of the code, but hated running CLI commands for every single component.
|
|
168
|
+
---
|
|
17
169
|
|
|
18
|
-
|
|
170
|
+
## 🌐 Custom Remote Templates (Host Your Own Shadcn UI!)
|
|
19
171
|
|
|
20
|
-
|
|
21
|
-
// 1. You type this in your App.jsx:
|
|
22
|
-
<div className="dolphin-card"></div>
|
|
172
|
+
One of the most revolutionary features of DolphinCSS is that **you are not limited to our built-in components.** You can easily create, host, and distribute your own custom React/JSX components remotely from your own GitHub repository for free!
|
|
23
173
|
|
|
24
|
-
|
|
174
|
+
### Step 1: Create Your Templates Repository
|
|
175
|
+
Create a public repository on GitHub (e.g., `https://github.com/YourUsername/my-dolphincss-templates`).
|
|
25
176
|
|
|
26
|
-
|
|
27
|
-
<div className="glass card p-6 border border-white/20 rounded-2xl max-w-sm hover:shadow-xl hover:-translate-y-1 transition-all duration-300 relative overflow-hidden" style={{ backdropFilter: 'blur(20px)' }}>
|
|
28
|
-
{/* Full customizable code is now YOURS */}
|
|
29
|
-
</div>
|
|
177
|
+
Create the following folder structure inside it:
|
|
30
178
|
```
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<button className="px-6 py-2 bg-blue-500 hover:bg-blue-600 text-white font-bold rounded-lg shadow-lg shadow-blue-500/50 transition-all">
|
|
38
|
-
Click
|
|
39
|
-
</button>
|
|
40
|
-
|
|
41
|
-
/* The DolphinCSS Way (Clean & Global) */
|
|
42
|
-
<button className="filled primary-500 glow btn-lg">
|
|
43
|
-
Click
|
|
44
|
-
</button>
|
|
179
|
+
my-dolphincss-templates/
|
|
180
|
+
├── config/
|
|
181
|
+
│ └── markers.json
|
|
182
|
+
└── templates/
|
|
183
|
+
├── dolphin-custom-header.html
|
|
184
|
+
└── dolphin-custom-card.html
|
|
45
185
|
```
|
|
46
186
|
|
|
47
|
-
###
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
### 4. 🎬 World-Class Built-in Animations
|
|
61
|
-
No need for `framer-motion` or `animate.css`. DolphinCSS ships with a complete `@layer utilities` animation engine that you can drop on any HTML element.
|
|
62
|
-
|
|
63
|
-
- **Continuous:** `float`, `spin-slow`, `pulse`, `bounce`, `shimmer`, `gradient-flow`, `neon-flicker`
|
|
64
|
-
- **Hover:** `hover-pulse`, `hover-jelly`, `hover-glow`, `hover-ripple`
|
|
65
|
-
- **Entrance:** `fade-in`, `slide-up`, `zoom-in`, `rotate-3d`
|
|
66
|
-
- **Controls:** `delay-200`, `duration-500`
|
|
67
|
-
|
|
68
|
-
```jsx
|
|
69
|
-
<img src="logo.png" className="float hover-jelly fade-in delay-200" />
|
|
187
|
+
### Step 2: Configure Your `config/markers.json`
|
|
188
|
+
Define your magic class names and link them to their respective template files inside `/templates/`:
|
|
189
|
+
```json
|
|
190
|
+
{
|
|
191
|
+
"dolphin-custom-header": {
|
|
192
|
+
"templateFile": "dolphin-custom-header.html",
|
|
193
|
+
"addClasses": ""
|
|
194
|
+
},
|
|
195
|
+
"dolphin-custom-card": {
|
|
196
|
+
"templateFile": "dolphin-custom-card.html",
|
|
197
|
+
"addClasses": "card glass glow"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
70
200
|
```
|
|
71
201
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
## 📦 Installation & Setup
|
|
75
|
-
|
|
76
|
-
1. **Install via npm:**
|
|
77
|
-
```bash
|
|
78
|
-
npm install tailwindcss @tailwindcss/vite dolphincss lucide-react
|
|
79
|
-
```
|
|
80
|
-
*(Note: `lucide-react` is required because the generated magic components use these beautiful icons by default.)*
|
|
81
|
-
|
|
82
|
-
2. **Add the Plugins:** (In `vite.config.js`)
|
|
83
|
-
```javascript
|
|
84
|
-
import { defineConfig } from 'vite'
|
|
85
|
-
import react from '@vitejs/plugin-react'
|
|
86
|
-
import tailwindcss from '@tailwindcss/vite'
|
|
87
|
-
import dolphincssPlugin from 'dolphincss/vite-plugin'
|
|
88
|
-
|
|
89
|
-
export default defineConfig({
|
|
90
|
-
plugins: [react(), tailwindcss(), dolphincssPlugin()]
|
|
91
|
-
})
|
|
92
|
-
```
|
|
202
|
+
### Step 3: Link Your Custom Repo to DolphinCSS
|
|
203
|
+
In your React project's root folder, create a file named `dolphin.config.json` and point the `remoteUrl` key to the **browser link** of your `markers.json` file on GitHub:
|
|
93
204
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
205
|
+
```json
|
|
206
|
+
{
|
|
207
|
+
"remoteUrl": "https://github.com/YourUsername/my-dolphincss-templates/blob/main/config/markers.json"
|
|
208
|
+
}
|
|
97
209
|
```
|
|
98
210
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- `<div className="dolphin-form-floating"></div>` (Beautiful Floating Label Form)
|
|
106
|
-
- `<div className="dolphin-form-standard"></div>` (Minimalist Standard Label Form)
|
|
107
|
-
- `<div className="dolphin-table"></div>` (Responsive Data Table)
|
|
108
|
-
- `<div className="dolphin-toast"></div>` (Notification Toast)
|
|
109
|
-
- `<div className="dolphin-modal"></div>` (Native HTML Dialog Modal)
|
|
110
|
-
- `<div className="dolphin-button"></div>` (Button Variants Showcase)
|
|
111
|
-
- `<div className="dolphin-card"></div>` (Glassmorphic Profile Card)
|
|
112
|
-
- `<div className="dolphin-grid"></div>` (Responsive Product/Car Grid)
|
|
113
|
-
- `<div className="dolphin-navbar"></div>` (Sleek Navigation Bar)
|
|
114
|
-
- `<div className="dolphin-header"></div>` (Modern Header/Navbar)
|
|
115
|
-
- `<div className="dolphin-footer"></div>` (Premium Footer Section)
|
|
116
|
-
- `<div className="dolphin-alert"></div>` (Modern Alert Box)
|
|
117
|
-
- `<div className="dolphin-badge"></div>` (Status Badges)
|
|
211
|
+
### How it works:
|
|
212
|
+
When you run `npm run dev`, DolphinCSS will:
|
|
213
|
+
1. Detect `dolphin.config.json` in your project root.
|
|
214
|
+
2. Read the `remoteUrl` and normalize it to fetch your custom `markers.json`.
|
|
215
|
+
3. Watch for your custom magic markers in your source code (e.g. `<div className="dolphin-custom-header"></div>`).
|
|
216
|
+
4. Instantly fetch the custom templates from your GitHub repository on-demand, format them with perfect multi-line nesting/indentation, and auto-inject them directly into your file!
|
|
118
217
|
|
|
119
218
|
---
|
|
120
219
|
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
const fs = require('fs');
|
|
3
|
+
const path = require('path');
|
|
4
|
+
const { execSync } = require('child_process');
|
|
5
|
+
|
|
6
|
+
console.log('🧹 Dolphin CLI Cleanup Started...');
|
|
7
|
+
|
|
8
|
+
const projectRoot = process.cwd();
|
|
9
|
+
const vscodeDir = path.join(projectRoot, '.vscode');
|
|
10
|
+
|
|
11
|
+
// 1. Remove VS Code Custom Data & Snippets
|
|
12
|
+
try {
|
|
13
|
+
const tagsPath = path.join(vscodeDir, 'dolphin-tags.json');
|
|
14
|
+
const snippetsPath = path.join(vscodeDir, 'dolphin.code-snippets');
|
|
15
|
+
|
|
16
|
+
if (fs.existsSync(tagsPath)) {
|
|
17
|
+
fs.unlinkSync(tagsPath);
|
|
18
|
+
console.log('🗑️ Removed .vscode/dolphin-tags.json');
|
|
19
|
+
}
|
|
20
|
+
if (fs.existsSync(snippetsPath)) {
|
|
21
|
+
fs.unlinkSync(snippetsPath);
|
|
22
|
+
console.log('🗑️ Removed .vscode/dolphin.code-snippets');
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
// Remove from settings.json
|
|
26
|
+
const settingsPath = path.join(vscodeDir, 'settings.json');
|
|
27
|
+
if (fs.existsSync(settingsPath)) {
|
|
28
|
+
let settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
|
|
29
|
+
if (settings['html.customData']) {
|
|
30
|
+
settings['html.customData'] = settings['html.customData'].filter(p => p !== "./.vscode/dolphin-tags.json");
|
|
31
|
+
if (settings['html.customData'].length === 0) {
|
|
32
|
+
delete settings['html.customData'];
|
|
33
|
+
}
|
|
34
|
+
fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
|
|
35
|
+
console.log('🗑️ Cleaned up .vscode/settings.json');
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
// If settings.json is empty, delete it
|
|
39
|
+
if (Object.keys(settings).length === 0) {
|
|
40
|
+
fs.unlinkSync(settingsPath);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
// If .vscode is empty, remove it
|
|
45
|
+
if (fs.existsSync(vscodeDir) && fs.readdirSync(vscodeDir).length === 0) {
|
|
46
|
+
fs.rmdirSync(vscodeDir);
|
|
47
|
+
}
|
|
48
|
+
} catch (error) {
|
|
49
|
+
console.log('⚠️ Could not clean .vscode directory:', error.message);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// 2. Remove Config File
|
|
53
|
+
try {
|
|
54
|
+
const configPath = path.join(projectRoot, 'dolphin.config.json');
|
|
55
|
+
if (fs.existsSync(configPath)) {
|
|
56
|
+
fs.unlinkSync(configPath);
|
|
57
|
+
console.log('🗑️ Removed dolphin.config.json');
|
|
58
|
+
}
|
|
59
|
+
} catch (error) {
|
|
60
|
+
console.log('⚠️ Could not remove config file:', error.message);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// 3. Uninstall Package
|
|
64
|
+
console.log('📦 Attempting to uninstall dolphin-css-cli...');
|
|
65
|
+
try {
|
|
66
|
+
// Check if it's in package.json
|
|
67
|
+
const pkgPath = path.join(projectRoot, 'package.json');
|
|
68
|
+
if (fs.existsSync(pkgPath)) {
|
|
69
|
+
const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8'));
|
|
70
|
+
if ((pkg.dependencies && pkg.dependencies['dolphin-css-cli']) || (pkg.devDependencies && pkg.devDependencies['dolphin-css-cli'])) {
|
|
71
|
+
console.log('⏳ Uninstalling package via npm...');
|
|
72
|
+
execSync('npm uninstall dolphin-css-cli', { stdio: 'inherit' });
|
|
73
|
+
console.log('✅ Successfully uninstalled dolphin-css-cli');
|
|
74
|
+
} else {
|
|
75
|
+
console.log('ℹ️ Package not found in package.json. It might have been run via npx.');
|
|
76
|
+
}
|
|
77
|
+
} else {
|
|
78
|
+
console.log('ℹ️ No package.json found.');
|
|
79
|
+
}
|
|
80
|
+
} catch (error) {
|
|
81
|
+
console.log('⚠️ Could not automatically uninstall the package.');
|
|
82
|
+
console.log('💡 You can manually run: npm uninstall dolphin-css-cli');
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
console.log('\n🎉 Project Cleaned! Dolphin CLI has been completely removed from your project.');
|
|
86
|
+
console.log('Your clean code remains untouched. Have a great day! 🐬');
|