@botim/botim-cli 0.1.4 → 0.1.7
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/dist/cli.js +3 -3
- package/dist/cli.mjs +2 -2
- package/dist/templates/react/.botim/app.json5 +12 -0
- package/dist/templates/react/.botim/ci/post-version.sh +7 -0
- package/dist/templates/react/.cursorrules +37 -0
- package/dist/templates/react/scripts/.gitkeep +0 -0
- package/dist/templates/react/src/assets/animation/.gitkeep +0 -0
- package/dist/templates/react/src/assets/fonts/.gitkeep +0 -0
- package/dist/templates/react/src/assets/images/.gitkeep +0 -0
- package/dist/templates/templates/react/.botim/app.json5 +12 -0
- package/dist/templates/templates/react/.botim/ci/post-version.sh +7 -0
- package/dist/templates/templates/react/.cursorrules +37 -0
- package/dist/templates/templates/react/scripts/.gitkeep +0 -0
- package/dist/templates/templates/react/src/assets/animation/.gitkeep +0 -0
- package/dist/templates/templates/react/src/assets/fonts/.gitkeep +0 -0
- package/dist/templates/templates/react/src/assets/images/.gitkeep +0 -0
- package/package.json +1 -1
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Mini Program Starter Template - AI Rules
|
|
2
|
+
|
|
3
|
+
## Error Handling Rules
|
|
4
|
+
|
|
5
|
+
1. **Async API Call Errors**:
|
|
6
|
+
- Async API call errors should throw `AppError`
|
|
7
|
+
- Use `logger.error` to record all async API call errors
|
|
8
|
+
|
|
9
|
+
2. **Event Handler Errors**:
|
|
10
|
+
- Errors in event handlers should not happen (prevent with proper validation)
|
|
11
|
+
- If an error occurs, it should be caught and logged appropriately
|
|
12
|
+
|
|
13
|
+
3. **Error Boundary**:
|
|
14
|
+
- The error boundary itself cannot throw any errors
|
|
15
|
+
- Must be robust and handle all error scenarios gracefully
|
|
16
|
+
|
|
17
|
+
4. **React Component Errors**:
|
|
18
|
+
- Errors in React component render should be caught by ErrorBoundary
|
|
19
|
+
- Errors in component lifecycle should be caught by ErrorBoundary
|
|
20
|
+
- Errors in constructor should be caught by ErrorBoundary
|
|
21
|
+
|
|
22
|
+
## Code Quality
|
|
23
|
+
|
|
24
|
+
- Follow TypeScript strict mode
|
|
25
|
+
- Use ESLint rules as configured
|
|
26
|
+
- Maintain consistent code style (4 spaces indentation)
|
|
27
|
+
- Use i18next for all user-facing strings
|
|
28
|
+
- Follow React hooks rules
|
|
29
|
+
|
|
30
|
+
## Architecture
|
|
31
|
+
|
|
32
|
+
- Use Zustand for state management
|
|
33
|
+
- Use React Router for routing
|
|
34
|
+
- Use Emotion for styling
|
|
35
|
+
- Follow the established folder structure
|
|
36
|
+
- Keep components reusable and modular
|
|
37
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Mini Program Starter Template - AI Rules
|
|
2
|
+
|
|
3
|
+
## Error Handling Rules
|
|
4
|
+
|
|
5
|
+
1. **Async API Call Errors**:
|
|
6
|
+
- Async API call errors should throw `AppError`
|
|
7
|
+
- Use `logger.error` to record all async API call errors
|
|
8
|
+
|
|
9
|
+
2. **Event Handler Errors**:
|
|
10
|
+
- Errors in event handlers should not happen (prevent with proper validation)
|
|
11
|
+
- If an error occurs, it should be caught and logged appropriately
|
|
12
|
+
|
|
13
|
+
3. **Error Boundary**:
|
|
14
|
+
- The error boundary itself cannot throw any errors
|
|
15
|
+
- Must be robust and handle all error scenarios gracefully
|
|
16
|
+
|
|
17
|
+
4. **React Component Errors**:
|
|
18
|
+
- Errors in React component render should be caught by ErrorBoundary
|
|
19
|
+
- Errors in component lifecycle should be caught by ErrorBoundary
|
|
20
|
+
- Errors in constructor should be caught by ErrorBoundary
|
|
21
|
+
|
|
22
|
+
## Code Quality
|
|
23
|
+
|
|
24
|
+
- Follow TypeScript strict mode
|
|
25
|
+
- Use ESLint rules as configured
|
|
26
|
+
- Maintain consistent code style (4 spaces indentation)
|
|
27
|
+
- Use i18next for all user-facing strings
|
|
28
|
+
- Follow React hooks rules
|
|
29
|
+
|
|
30
|
+
## Architecture
|
|
31
|
+
|
|
32
|
+
- Use Zustand for state management
|
|
33
|
+
- Use React Router for routing
|
|
34
|
+
- Use Emotion for styling
|
|
35
|
+
- Follow the established folder structure
|
|
36
|
+
- Keep components reusable and modular
|
|
37
|
+
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/package.json
CHANGED