@funtools/create-react-native-app 1.0.0 → 1.0.1
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 +168 -0
- package/index.js +1 -2
- package/package.json +1 -1
package/README.md
ADDED
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
# @funtools/create-react-native-app
|
|
2
|
+
|
|
3
|
+
A CLI tool to quickly create a React Native app with a preconfigured setup, including navigation, state management, styling, and more.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
✨ **Quick Setup** - Creates a fully configured React Native app in seconds
|
|
8
|
+
📱 **Modern Stack** - Uses the latest React Native 0.83.1 and React 19.2.0
|
|
9
|
+
🎨 **Styled** - Preconfigured with NativeWind (Tailwind CSS for React Native)
|
|
10
|
+
🧭 **Navigation** - React Navigation already set up
|
|
11
|
+
📦 **State Management** - Includes @fun-tools/store
|
|
12
|
+
🎯 **TypeScript Ready** - Full TypeScript support out of the box
|
|
13
|
+
🎨 **Icons** - Lucide React Native icons included
|
|
14
|
+
|
|
15
|
+
## Prerequisites
|
|
16
|
+
|
|
17
|
+
- Node.js >= 20
|
|
18
|
+
- npm or yarn
|
|
19
|
+
|
|
20
|
+
## Installation
|
|
21
|
+
|
|
22
|
+
You can use this tool without installing it globally using `npx`:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx @funtools/create-react-native-app
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Or install it globally:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
npm install -g @funtools/create-react-native-app
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
Simply run the command and follow the interactive prompts:
|
|
37
|
+
|
|
38
|
+
```bash
|
|
39
|
+
npx @funtools/create-react-native-app
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
You'll be asked to provide an app name. The app name must:
|
|
43
|
+
|
|
44
|
+
- Start with an uppercase letter
|
|
45
|
+
- Contain only letters and numbers
|
|
46
|
+
|
|
47
|
+
### Example
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
$ npx @funtools/create-react-native-app
|
|
51
|
+
Welcome to @funtools
|
|
52
|
+
? What is your app name? › MyAwesomeApp
|
|
53
|
+
🚀 Initializing React Native app: MyAwesomeApp
|
|
54
|
+
Initializing templates...
|
|
55
|
+
Updating package.json...
|
|
56
|
+
Installing dependencies...
|
|
57
|
+
✅ App setup complete
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## What's Included
|
|
61
|
+
|
|
62
|
+
Your new React Native app comes preconfigured with:
|
|
63
|
+
|
|
64
|
+
### Dependencies
|
|
65
|
+
|
|
66
|
+
- **React Native 0.83.1** - Latest React Native framework
|
|
67
|
+
- **React 19.2.0** - Latest React library
|
|
68
|
+
- **React Navigation** - Native Stack Navigator for routing
|
|
69
|
+
- **NativeWind** - Tailwind CSS for React Native styling
|
|
70
|
+
- **@fun-tools/store** - State management solution
|
|
71
|
+
- **Lucide React Native** - Beautiful icon library
|
|
72
|
+
- **React Native SVG** - SVG support
|
|
73
|
+
|
|
74
|
+
### Dev Tools
|
|
75
|
+
|
|
76
|
+
- **TypeScript** - Type safety and better developer experience
|
|
77
|
+
- **ESLint** - Code linting
|
|
78
|
+
- **Prettier** - Code formatting
|
|
79
|
+
- **Jest** - Testing framework
|
|
80
|
+
- **Babel** - JavaScript compiler with module resolver
|
|
81
|
+
|
|
82
|
+
## Getting Started with Your New App
|
|
83
|
+
|
|
84
|
+
After creating your app:
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
# Navigate to your app directory
|
|
88
|
+
cd MyAwesomeApp
|
|
89
|
+
|
|
90
|
+
# Start the Metro bundler
|
|
91
|
+
npm start
|
|
92
|
+
|
|
93
|
+
# Run on Android
|
|
94
|
+
npm run android
|
|
95
|
+
|
|
96
|
+
# Run on iOS
|
|
97
|
+
npm run ios
|
|
98
|
+
|
|
99
|
+
# Run tests
|
|
100
|
+
npm test
|
|
101
|
+
|
|
102
|
+
# Lint your code
|
|
103
|
+
npm run lint
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
## Project Structure
|
|
107
|
+
|
|
108
|
+
```
|
|
109
|
+
MyAwesomeApp/
|
|
110
|
+
├── android/ # Android native code
|
|
111
|
+
├── ios/ # iOS native code
|
|
112
|
+
├── src/ # Your app source code
|
|
113
|
+
├── node_modules/ # Dependencies
|
|
114
|
+
├── package.json # Project configuration
|
|
115
|
+
├── tsconfig.json # TypeScript configuration
|
|
116
|
+
├── tailwind.config.js # Tailwind CSS configuration
|
|
117
|
+
└── ...
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Requirements
|
|
121
|
+
|
|
122
|
+
- **Node.js**: >= 20
|
|
123
|
+
- **React Native CLI**: Automatically installed
|
|
124
|
+
- **Android Studio** (for Android development)
|
|
125
|
+
- **Xcode** (for iOS development on macOS)
|
|
126
|
+
|
|
127
|
+
## Troubleshooting
|
|
128
|
+
|
|
129
|
+
### App name validation error
|
|
130
|
+
|
|
131
|
+
Make sure your app name:
|
|
132
|
+
|
|
133
|
+
- Starts with an uppercase letter
|
|
134
|
+
- Contains only letters and numbers (no spaces, hyphens, or special characters)
|
|
135
|
+
|
|
136
|
+
### Dependencies installation fails
|
|
137
|
+
|
|
138
|
+
Try clearing npm cache and reinstalling:
|
|
139
|
+
|
|
140
|
+
```bash
|
|
141
|
+
npm cache clean --force
|
|
142
|
+
rm -rf node_modules package-lock.json
|
|
143
|
+
npm install
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
### Metro bundler issues
|
|
147
|
+
|
|
148
|
+
Reset the Metro bundler cache:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npm start -- --reset-cache
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Contributing
|
|
155
|
+
|
|
156
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
157
|
+
|
|
158
|
+
## License
|
|
159
|
+
|
|
160
|
+
MIT
|
|
161
|
+
|
|
162
|
+
## Support
|
|
163
|
+
|
|
164
|
+
For issues and questions, please open an issue on the GitHub repository.
|
|
165
|
+
|
|
166
|
+
---
|
|
167
|
+
|
|
168
|
+
**Happy coding! 🚀**
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
import { fileURLToPath } from "url";
|
|
4
4
|
import path from "path";
|
|
@@ -25,7 +25,6 @@ try {
|
|
|
25
25
|
} catch (e) {
|
|
26
26
|
console.error("❌ Failed to create app");
|
|
27
27
|
console.error(error);
|
|
28
|
-
} finally {
|
|
29
28
|
process.exit(1);
|
|
30
29
|
}
|
|
31
30
|
|