next-lovable 0.0.48 → 0.0.49
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 +76 -61
- package/dist/next-lovable-linux +0 -0
- package/dist/next-lovable-macos +0 -0
- package/dist/next-lovable-macos-arm +0 -0
- package/dist/next-lovable-win.exe +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,24 +1,28 @@
|
|
|
1
1
|
# next-lovable
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
An intelligent CLI tool to automatically migrate React applications to Next.js 13+ (App Router), specializing in React Router to App Router conversions.
|
|
4
4
|
|
|
5
|
-
## Features
|
|
5
|
+
## Key Features
|
|
6
6
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
7
|
+
- 🚀 Smart React Router to Next.js App Router conversion
|
|
8
|
+
- 📦 Automated migration from Vite to Next.js build system
|
|
9
|
+
- 🔄 Intelligent component transformation with 'use client' directives
|
|
10
|
+
- 🎯 Automatic handling of:
|
|
11
|
+
- Route configurations
|
|
12
|
+
- Layouts and page structures
|
|
13
|
+
- Package dependencies
|
|
14
|
+
- React Helmet to Next.js Metadata
|
|
15
|
+
- Client/Server component separation
|
|
13
16
|
|
|
14
17
|
## Prerequisites
|
|
15
18
|
|
|
16
19
|
- Node.js 18.x or higher
|
|
17
20
|
- npm or yarn
|
|
21
|
+
- A nextlovable.com account
|
|
18
22
|
- A React project using:
|
|
19
23
|
- React Router
|
|
20
|
-
- Vite
|
|
21
|
-
- TypeScript (optional)
|
|
24
|
+
- Vite
|
|
25
|
+
- TypeScript (optional but recommended)
|
|
22
26
|
|
|
23
27
|
## Installation
|
|
24
28
|
|
|
@@ -26,87 +30,98 @@ A CLI tool to migrate React applications to Next.js 13+ (App Router).
|
|
|
26
30
|
npm install -g next-lovable
|
|
27
31
|
```
|
|
28
32
|
|
|
33
|
+
## Authentication
|
|
34
|
+
|
|
35
|
+
The tool requires authentication with your nextlovable.com account:
|
|
36
|
+
- Login will be prompted on first use
|
|
37
|
+
- Sessions are securely stored for future use
|
|
38
|
+
- Automatic token refresh handling
|
|
39
|
+
|
|
29
40
|
## Usage
|
|
30
41
|
|
|
31
|
-
Basic
|
|
42
|
+
### Basic Command
|
|
43
|
+
|
|
32
44
|
```bash
|
|
33
45
|
next-lovable <source-directory> [target-directory]
|
|
34
46
|
```
|
|
35
47
|
|
|
36
|
-
|
|
48
|
+
### Dry Run Mode (Recommended First Step)
|
|
49
|
+
|
|
37
50
|
```bash
|
|
38
51
|
next-lovable ./my-react-app --dry-run
|
|
39
52
|
```
|
|
40
53
|
|
|
41
|
-
The `--dry-run`
|
|
42
|
-
-
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
54
|
+
The `--dry-run` option provides:
|
|
55
|
+
- 🔍 Complete project analysis
|
|
56
|
+
- 📝 Detailed migration report
|
|
57
|
+
- ⚠️ Potential issue warnings
|
|
58
|
+
- 📊 List of files to be modified
|
|
59
|
+
- 🎯 Preview of transformations
|
|
60
|
+
- 0️⃣ No actual changes made
|
|
47
61
|
|
|
62
|
+
### Full Migration
|
|
48
63
|
|
|
49
|
-
With options:
|
|
50
64
|
```bash
|
|
51
65
|
next-lovable ./my-react-app ./next-app --yes --install
|
|
52
66
|
```
|
|
53
67
|
|
|
54
|
-
### Options
|
|
68
|
+
### Available Options
|
|
55
69
|
|
|
56
70
|
- `-y, --yes`: Skip confirmation prompts
|
|
57
71
|
- `-i, --install`: Install dependencies after migration
|
|
72
|
+
- `-d, --dry-run`: Simulation mode without changes
|
|
58
73
|
- `--help`: Show help information
|
|
59
|
-
- `--d, --dry-run`: Run migration in simulation mode without making actual changes. Shows what files would be created/modified.
|
|
60
74
|
|
|
61
|
-
|
|
75
|
+
## Migration Process
|
|
62
76
|
|
|
63
|
-
1.
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
77
|
+
1. **Authentication & Validation**
|
|
78
|
+
- Account verification
|
|
79
|
+
- Project structure validation
|
|
80
|
+
- Dependencies check
|
|
67
81
|
|
|
68
|
-
2.
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
82
|
+
2. **Smart Analysis**
|
|
83
|
+
- Route structure analysis
|
|
84
|
+
- Component classification
|
|
85
|
+
- Context provider detection
|
|
86
|
+
- Client/Server boundary identification
|
|
72
87
|
|
|
73
|
-
3.
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
88
|
+
3. **Automated Transformations**
|
|
89
|
+
- React Router to App Router conversion
|
|
90
|
+
- Layout structure creation
|
|
91
|
+
- Component migrations
|
|
92
|
+
- Dependency updates
|
|
93
|
+
- Configuration generation
|
|
77
94
|
|
|
78
|
-
|
|
95
|
+
4. **Post-Migration Setup**
|
|
96
|
+
- Next.js configuration
|
|
97
|
+
- TypeScript adjustments
|
|
98
|
+
- Development environment setup
|
|
79
99
|
|
|
80
|
-
|
|
81
|
-
- Validates source project
|
|
82
|
-
- Creates target directory
|
|
100
|
+
## Intelligent Features
|
|
83
101
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
102
|
+
- 🧠 Smart component analysis for 'use client' directives
|
|
103
|
+
- 🔄 Automatic context provider migration
|
|
104
|
+
- 📱 Layout preservation and enhancement
|
|
105
|
+
- 🛠️ Dependency resolution and cleanup
|
|
106
|
+
- 🎯 Typescript support and type preservation
|
|
88
107
|
|
|
89
|
-
|
|
90
|
-
- Adds 'use client' directives
|
|
91
|
-
- Updates import paths
|
|
92
|
-
- Converts router code
|
|
93
|
-
- Creates Next.js page files
|
|
108
|
+
## Post-Migration
|
|
94
109
|
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
110
|
+
1. Review generated files in `src/app`
|
|
111
|
+
2. Test with `npm run dev`
|
|
112
|
+
3. Check converted routes
|
|
113
|
+
4. Verify component functionality
|
|
99
114
|
|
|
100
|
-
##
|
|
115
|
+
## Limitations
|
|
101
116
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
117
|
+
- Complex custom route configurations may need manual adjustments
|
|
118
|
+
- Dynamic route parameters might require review
|
|
119
|
+
- Some third-party integrations may need updates
|
|
120
|
+
- Complex state management setups might need fine-tuning
|
|
106
121
|
|
|
107
|
-
##
|
|
122
|
+
## Best Practices
|
|
108
123
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
124
|
+
1. Always run `--dry-run` first
|
|
125
|
+
2. Keep a backup of your original project
|
|
126
|
+
3. Review generated files before deployment
|
|
127
|
+
4. Test thoroughly after migration
|
package/dist/next-lovable-linux
CHANGED
|
Binary file
|
package/dist/next-lovable-macos
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|