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 CHANGED
@@ -1,24 +1,28 @@
1
1
  # next-lovable
2
2
 
3
- A CLI tool to migrate React applications to Next.js 13+ (App Router).
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
- - Converts React Router routes to Next.js App Router
8
- - Migrates from Vite to Next.js build system
9
- - Handles package.json dependencies
10
- - Preserves existing components and layouts
11
- - Adds necessary Next.js configuration files
12
- - Supports TypeScript projects
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 (as build tool)
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 usage:
42
+ ### Basic Command
43
+
32
44
  ```bash
33
45
  next-lovable <source-directory> [target-directory]
34
46
  ```
35
47
 
36
- Test migration without making changes or using credit:
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` (or `-d`) option simulates the migration process without making actual changes. This is useful to:
42
- - Validate your project structure
43
- - Check for potential conversion errors
44
- - Preview file modifications
45
- - Avoid using conversion credits unnecessarily
46
- - Get a report of all changes that would be made
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
- ### Examples
75
+ ## Migration Process
62
76
 
63
- 1. Basic migration:
64
- ```bash
65
- next-lovable ./my-react-app
66
- ```
77
+ 1. **Authentication & Validation**
78
+ - Account verification
79
+ - Project structure validation
80
+ - Dependencies check
67
81
 
68
- 2. Specify target directory:
69
- ```bash
70
- next-lovable ./my-react-app ./converted-app
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. Non-interactive migration with dependency installation:
74
- ```bash
75
- next-lovable ./my-react-app --yes --install
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
- ## Migration Process
95
+ 4. **Post-Migration Setup**
96
+ - Next.js configuration
97
+ - TypeScript adjustments
98
+ - Development environment setup
79
99
 
80
- 1. **Setup and Validation**
81
- - Validates source project
82
- - Creates target directory
100
+ ## Intelligent Features
83
101
 
84
- 2. **Project Structure**
85
- - Copies project files
86
- - Restructures directories to Next.js format
87
- - Converts route structure
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
- 3. **Code Transformation**
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
- 4. **Configuration**
96
- - Updates package.json
97
- - Creates Next.js config files
98
- - Sets up root layout
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
- ## Post-Migration Steps
115
+ ## Limitations
101
116
 
102
- 1. Review generated files in `src/app`
103
- 2. Check component imports and paths
104
- 3. Update any remaining router-specific code
105
- 4. Test the application with `npm run dev`
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
- ## Known Limitations
122
+ ## Best Practices
108
123
 
109
- - Complex React Router configurations may need manual adjustment
110
- - Custom route handling might require additional setup
111
- - State management libraries may need manual updates
112
- - Some components might need manual 'use client' directive additions
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
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next-lovable",
3
- "version": "0.0.48",
3
+ "version": "0.0.49",
4
4
  "description": "Cross-platform tool to migrate Lovable React projects to Next.js",
5
5
  "main": "./dist/index.js",
6
6
  "homepage": "https://nextlovable.com",