start-it-cli 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/CHECKLIST.md +197 -0
- package/PROJECT_SUMMARY.md +279 -0
- package/QUICK_START.md +113 -0
- package/README.md +126 -0
- package/dist/cli.js +143 -0
- package/dist/generator.js +49 -0
- package/dist/templates/flutter.js +606 -0
- package/dist/templates/go.js +335 -0
- package/dist/templates/index.js +34 -0
- package/dist/templates/node.js +447 -0
- package/dist/templates/python.js +558 -0
- package/dist/templates/react-native.js +370 -0
- package/dist/templates/spring-boot.js +651 -0
- package/dist/types.js +3 -0
- package/package.json +49 -0
|
@@ -0,0 +1,370 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.reactNativeTemplates = void 0;
|
|
4
|
+
exports.reactNativeTemplates = {
|
|
5
|
+
Expo: {
|
|
6
|
+
name: "Expo",
|
|
7
|
+
description: "A React Native app using Expo",
|
|
8
|
+
files: [
|
|
9
|
+
{
|
|
10
|
+
path: "package.json",
|
|
11
|
+
content: `{
|
|
12
|
+
"name": "my-expo-app",
|
|
13
|
+
"version": "1.0.0",
|
|
14
|
+
"main": "node_modules/expo/AppEntry.js",
|
|
15
|
+
"scripts": {
|
|
16
|
+
"start": "expo start",
|
|
17
|
+
"android": "expo start --android",
|
|
18
|
+
"ios": "expo start --ios",
|
|
19
|
+
"web": "expo start --web"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"expo": "~49.0.0",
|
|
23
|
+
"expo-status-bar": "~1.6.0",
|
|
24
|
+
"react": "18.2.0",
|
|
25
|
+
"react-native": "0.72.4",
|
|
26
|
+
"react-native-web": "~0.19.0"
|
|
27
|
+
},
|
|
28
|
+
"devDependencies": {
|
|
29
|
+
"@babel/core": "^7.20.0"
|
|
30
|
+
},
|
|
31
|
+
"private": true
|
|
32
|
+
}
|
|
33
|
+
`,
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
path: "app.json",
|
|
37
|
+
content: `{
|
|
38
|
+
"expo": {
|
|
39
|
+
"name": "my-expo-app",
|
|
40
|
+
"slug": "my-expo-app",
|
|
41
|
+
"version": "1.0.0",
|
|
42
|
+
"assetBundlePatterns": [
|
|
43
|
+
"**/*"
|
|
44
|
+
],
|
|
45
|
+
"ios": {
|
|
46
|
+
"supportsTabletMode": true
|
|
47
|
+
},
|
|
48
|
+
"android": {
|
|
49
|
+
"adaptiveIcon": {
|
|
50
|
+
"foregroundImage": "./assets/adaptive-icon.png",
|
|
51
|
+
"backgroundColor": "#ffffff"
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
"web": {
|
|
55
|
+
"favicon": "./assets/favicon.png"
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
`,
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
path: "App.tsx",
|
|
63
|
+
content: `import { StatusBar } from 'expo-status-bar';
|
|
64
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
65
|
+
|
|
66
|
+
export default function App() {
|
|
67
|
+
return (
|
|
68
|
+
<View style={styles.container}>
|
|
69
|
+
<Text style={styles.title}>Welcome to Expo!</Text>
|
|
70
|
+
<Text style={styles.subtitle}>Edit App.tsx to get started</Text>
|
|
71
|
+
<StatusBar style="auto" />
|
|
72
|
+
</View>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
const styles = StyleSheet.create({
|
|
77
|
+
container: {
|
|
78
|
+
flex: 1,
|
|
79
|
+
backgroundColor: '#fff',
|
|
80
|
+
alignItems: 'center',
|
|
81
|
+
justifyContent: 'center',
|
|
82
|
+
},
|
|
83
|
+
title: {
|
|
84
|
+
fontSize: 24,
|
|
85
|
+
fontWeight: 'bold',
|
|
86
|
+
marginBottom: 10,
|
|
87
|
+
},
|
|
88
|
+
subtitle: {
|
|
89
|
+
fontSize: 16,
|
|
90
|
+
color: '#666',
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
`,
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
path: "tsconfig.json",
|
|
97
|
+
content: `{
|
|
98
|
+
"extends": "expo/tsconfig",
|
|
99
|
+
"compilerOptions": {
|
|
100
|
+
"strict": true,
|
|
101
|
+
"esModuleInterop": true,
|
|
102
|
+
"skipLibCheck": true,
|
|
103
|
+
"forceConsistentCasingInFileNames": true
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
`,
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
path: "README.md",
|
|
110
|
+
content: `# Expo React Native App
|
|
111
|
+
|
|
112
|
+
A React Native application using Expo.
|
|
113
|
+
|
|
114
|
+
## Getting Started
|
|
115
|
+
|
|
116
|
+
### Prerequisites
|
|
117
|
+
|
|
118
|
+
- Node.js and npm
|
|
119
|
+
- Expo CLI
|
|
120
|
+
|
|
121
|
+
### Setup
|
|
122
|
+
|
|
123
|
+
\`\`\`bash
|
|
124
|
+
npm install
|
|
125
|
+
\`\`\`
|
|
126
|
+
|
|
127
|
+
### Run
|
|
128
|
+
|
|
129
|
+
\`\`\`bash
|
|
130
|
+
npm start
|
|
131
|
+
\`\`\`
|
|
132
|
+
|
|
133
|
+
Then:
|
|
134
|
+
- Press \`i\` for iOS simulator
|
|
135
|
+
- Press \`a\` for Android emulator
|
|
136
|
+
- Press \`w\` for web
|
|
137
|
+
|
|
138
|
+
### Build
|
|
139
|
+
|
|
140
|
+
\`\`\`bash
|
|
141
|
+
expo build:ios
|
|
142
|
+
expo build:android
|
|
143
|
+
\`\`\`
|
|
144
|
+
|
|
145
|
+
## Project Structure
|
|
146
|
+
|
|
147
|
+
- \`App.tsx\` - Main application component
|
|
148
|
+
- \`app.json\` - Expo configuration
|
|
149
|
+
- \`package.json\` - Dependencies
|
|
150
|
+
`,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
path: ".gitignore",
|
|
154
|
+
content: `node_modules/
|
|
155
|
+
.expo/
|
|
156
|
+
.expo-shared/
|
|
157
|
+
dist/
|
|
158
|
+
npm-debug.*
|
|
159
|
+
*.jks
|
|
160
|
+
*.p8
|
|
161
|
+
*.p12
|
|
162
|
+
*.key
|
|
163
|
+
*.mobileprovision
|
|
164
|
+
*.orig.*
|
|
165
|
+
web-build/
|
|
166
|
+
.env
|
|
167
|
+
.env.local
|
|
168
|
+
`,
|
|
169
|
+
},
|
|
170
|
+
],
|
|
171
|
+
},
|
|
172
|
+
"Bare React Native": {
|
|
173
|
+
name: "Bare React Native",
|
|
174
|
+
description: "A bare React Native project",
|
|
175
|
+
files: [
|
|
176
|
+
{
|
|
177
|
+
path: "package.json",
|
|
178
|
+
content: `{
|
|
179
|
+
"name": "my-rn-app",
|
|
180
|
+
"version": "0.0.1",
|
|
181
|
+
"private": true,
|
|
182
|
+
"scripts": {
|
|
183
|
+
"android": "react-native run-android",
|
|
184
|
+
"ios": "react-native run-ios",
|
|
185
|
+
"lint": "eslint . --ext .js,.jsx,.ts,.tsx",
|
|
186
|
+
"start": "react-native start",
|
|
187
|
+
"test": "jest"
|
|
188
|
+
},
|
|
189
|
+
"dependencies": {
|
|
190
|
+
"react": "18.2.0",
|
|
191
|
+
"react-native": "0.72.4"
|
|
192
|
+
},
|
|
193
|
+
"devDependencies": {
|
|
194
|
+
"@babel/core": "^7.20.0",
|
|
195
|
+
"@babel/preset-env": "^7.20.0",
|
|
196
|
+
"@babel/preset-react": "^7.18.0",
|
|
197
|
+
"@babel/preset-typescript": "^7.18.0",
|
|
198
|
+
"@react-native/eslint-config": "^0.72.0",
|
|
199
|
+
"@react-native/metro-config": "^0.72.0",
|
|
200
|
+
"@tsconfig/react-native": "^2.0.2",
|
|
201
|
+
"@types/jest": "^29.5.0",
|
|
202
|
+
"@types/react": "^18.0.0",
|
|
203
|
+
"@types/react-native": "^0.72.0",
|
|
204
|
+
"babel-jest": "^29.5.0",
|
|
205
|
+
"jest": "^29.5.0",
|
|
206
|
+
"metro-react-native-babel-preset": "0.76.5",
|
|
207
|
+
"prettier": "^2.8.0",
|
|
208
|
+
"typescript": "4.8.4"
|
|
209
|
+
},
|
|
210
|
+
"engines": {
|
|
211
|
+
"node": ">=16"
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
`,
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
path: "App.tsx",
|
|
218
|
+
content: `import React from 'react';
|
|
219
|
+
import {
|
|
220
|
+
SafeAreaView,
|
|
221
|
+
ScrollView,
|
|
222
|
+
StatusBar,
|
|
223
|
+
StyleSheet,
|
|
224
|
+
Text,
|
|
225
|
+
View,
|
|
226
|
+
} from 'react-native';
|
|
227
|
+
|
|
228
|
+
function App(): React.JSX.Element {
|
|
229
|
+
return (
|
|
230
|
+
<SafeAreaView style={styles.container}>
|
|
231
|
+
<StatusBar barStyle="dark-content" />
|
|
232
|
+
<ScrollView contentInsetAdjustmentBehavior="automatic">
|
|
233
|
+
<View style={styles.content}>
|
|
234
|
+
<Text style={styles.title}>Welcome to React Native!</Text>
|
|
235
|
+
<Text style={styles.subtitle}>Edit App.tsx to get started</Text>
|
|
236
|
+
</View>
|
|
237
|
+
</ScrollView>
|
|
238
|
+
</SafeAreaView>
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const styles = StyleSheet.create({
|
|
243
|
+
container: {
|
|
244
|
+
flex: 1,
|
|
245
|
+
backgroundColor: '#fff',
|
|
246
|
+
},
|
|
247
|
+
content: {
|
|
248
|
+
padding: 20,
|
|
249
|
+
alignItems: 'center',
|
|
250
|
+
justifyContent: 'center',
|
|
251
|
+
},
|
|
252
|
+
title: {
|
|
253
|
+
fontSize: 24,
|
|
254
|
+
fontWeight: 'bold',
|
|
255
|
+
marginBottom: 10,
|
|
256
|
+
},
|
|
257
|
+
subtitle: {
|
|
258
|
+
fontSize: 16,
|
|
259
|
+
color: '#666',
|
|
260
|
+
},
|
|
261
|
+
});
|
|
262
|
+
|
|
263
|
+
export default App;
|
|
264
|
+
`,
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
path: "index.js",
|
|
268
|
+
content: `import {AppRegistry} from 'react-native';
|
|
269
|
+
import App from './App';
|
|
270
|
+
import {name as appName} from './app.json';
|
|
271
|
+
|
|
272
|
+
AppRegistry.registerComponent(appName, () => App);
|
|
273
|
+
`,
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
path: "app.json",
|
|
277
|
+
content: `{
|
|
278
|
+
"name": "my-rn-app",
|
|
279
|
+
"displayName": "MyRNApp"
|
|
280
|
+
}
|
|
281
|
+
`,
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
path: "tsconfig.json",
|
|
285
|
+
content: `{
|
|
286
|
+
"extends": "@tsconfig/react-native/tsconfig.json",
|
|
287
|
+
"compilerOptions": {
|
|
288
|
+
"strict": true,
|
|
289
|
+
"esModuleInterop": true,
|
|
290
|
+
"skipLibCheck": true,
|
|
291
|
+
"forceConsistentCasingInFileNames": true
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
`,
|
|
295
|
+
},
|
|
296
|
+
{
|
|
297
|
+
path: "README.md",
|
|
298
|
+
content: `# Bare React Native App
|
|
299
|
+
|
|
300
|
+
A bare React Native application.
|
|
301
|
+
|
|
302
|
+
## Getting Started
|
|
303
|
+
|
|
304
|
+
### Prerequisites
|
|
305
|
+
|
|
306
|
+
- Node.js and npm
|
|
307
|
+
- Xcode (for iOS)
|
|
308
|
+
- Android Studio (for Android)
|
|
309
|
+
|
|
310
|
+
### Setup
|
|
311
|
+
|
|
312
|
+
\`\`\`bash
|
|
313
|
+
npm install
|
|
314
|
+
\`\`\`
|
|
315
|
+
|
|
316
|
+
### Run
|
|
317
|
+
|
|
318
|
+
\`\`\`bash
|
|
319
|
+
# iOS
|
|
320
|
+
npm run ios
|
|
321
|
+
|
|
322
|
+
# Android
|
|
323
|
+
npm run android
|
|
324
|
+
|
|
325
|
+
# Start development server
|
|
326
|
+
npm start
|
|
327
|
+
\`\`\`
|
|
328
|
+
|
|
329
|
+
## Project Structure
|
|
330
|
+
|
|
331
|
+
- \`App.tsx\` - Main application component
|
|
332
|
+
- \`index.js\` - Application entry point
|
|
333
|
+
- \`app.json\` - App configuration
|
|
334
|
+
`,
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
path: ".gitignore",
|
|
338
|
+
content: `# Logs
|
|
339
|
+
logs
|
|
340
|
+
*.log
|
|
341
|
+
npm-debug.log*
|
|
342
|
+
yarn-debug.log*
|
|
343
|
+
yarn-error.log*
|
|
344
|
+
|
|
345
|
+
# Dependencies
|
|
346
|
+
node_modules/
|
|
347
|
+
|
|
348
|
+
# Misc
|
|
349
|
+
.DS_Store
|
|
350
|
+
.env
|
|
351
|
+
.env.local
|
|
352
|
+
.env.*.local
|
|
353
|
+
|
|
354
|
+
# IDE
|
|
355
|
+
.vscode/
|
|
356
|
+
.idea/
|
|
357
|
+
*.swp
|
|
358
|
+
*.swo
|
|
359
|
+
|
|
360
|
+
# React Native
|
|
361
|
+
android/
|
|
362
|
+
ios/
|
|
363
|
+
.gradle/
|
|
364
|
+
.m2/
|
|
365
|
+
`,
|
|
366
|
+
},
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
};
|
|
370
|
+
//# sourceMappingURL=react-native.js.map
|