@idealyst/cli 1.0.23 → 1.0.25
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 +109 -109
- package/dist/index.js +119 -30
- package/dist/types/generators/api.d.ts +2 -0
- package/dist/types/generators/index.d.ts +1 -0
- package/dist/types/generators/utils.d.ts +14 -1
- package/dist/types/types.d.ts +1 -1
- package/package.json +1 -1
- package/templates/api/README.md +207 -0
- package/templates/api/env.example +12 -0
- package/templates/api/package.json +49 -0
- package/templates/api/prisma/schema.prisma +21 -0
- package/templates/api/src/context.ts +23 -0
- package/templates/api/src/controllers/UserController.ts +102 -0
- package/templates/api/src/index.ts +50 -0
- package/templates/api/src/lib/controller.ts +90 -0
- package/templates/api/src/lib/middleware.ts +170 -0
- package/templates/api/src/middleware/auth.ts +75 -0
- package/templates/api/src/middleware/common.ts +103 -0
- package/templates/api/src/router/index.ts +130 -0
- package/templates/api/src/trpc.ts +28 -0
- package/templates/api/tsconfig.json +44 -0
- package/templates/native/.yarnrc.yml +18 -18
- package/templates/native/App.tsx +23 -23
- package/templates/native/README.md +85 -85
- package/templates/native/app.json +4 -4
- package/templates/native/babel.config.js +9 -9
- package/templates/native/index.js +5 -5
- package/templates/native/metro.config.js +27 -21
- package/templates/native/package.json +9 -9
- package/templates/native/tsconfig.json +29 -29
- package/templates/shared/README.md +108 -108
- package/templates/shared/package.json +39 -41
- package/templates/shared/src/index.ts +1 -11
- package/templates/shared/tsconfig.json +24 -24
- package/templates/web/README.md +89 -89
- package/templates/web/index.html +12 -12
- package/templates/web/package.json +51 -51
- package/templates/web/src/App.tsx +14 -14
- package/templates/web/src/main.tsx +24 -24
- package/templates/web/tsconfig.json +26 -26
- package/templates/web/vite.config.ts +68 -65
- package/templates/workspace/.yarnrc.yml +25 -25
- package/templates/workspace/README.md +79 -79
- package/templates/workspace/package.json +24 -24
- package/templates/shared/.yarnrc.yml +0 -19
- package/templates/shared/rollup.config.js +0 -27
- package/templates/shared/src/components/SharedComponent.tsx +0 -41
- package/templates/shared/src/components/index.ts +0 -3
- package/templates/shared/src/types/index.ts +0 -17
- package/templates/shared/src/utils/helpers.ts +0 -34
- package/templates/shared/src/utils/index.ts +0 -2
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"lib": ["ES2020"],
|
|
6
|
-
"moduleResolution": "node",
|
|
7
|
-
"esModuleInterop": true,
|
|
8
|
-
"allowSyntheticDefaultImports": true,
|
|
9
|
-
"strict": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"declaration": true,
|
|
13
|
-
"declarationDir": "./dist",
|
|
14
|
-
"outDir": "./dist",
|
|
15
|
-
"rootDir": "./src",
|
|
16
|
-
"jsx": "react-jsx"
|
|
17
|
-
},
|
|
18
|
-
"include": [
|
|
19
|
-
"src/**/*"
|
|
20
|
-
],
|
|
21
|
-
"exclude": [
|
|
22
|
-
"node_modules",
|
|
23
|
-
"dist"
|
|
24
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"module": "ESNext",
|
|
5
|
+
"lib": ["ES2020"],
|
|
6
|
+
"moduleResolution": "node",
|
|
7
|
+
"esModuleInterop": true,
|
|
8
|
+
"allowSyntheticDefaultImports": true,
|
|
9
|
+
"strict": true,
|
|
10
|
+
"skipLibCheck": true,
|
|
11
|
+
"forceConsistentCasingInFileNames": true,
|
|
12
|
+
"declaration": true,
|
|
13
|
+
"declarationDir": "./dist",
|
|
14
|
+
"outDir": "./dist",
|
|
15
|
+
"rootDir": "./src",
|
|
16
|
+
"jsx": "react-jsx"
|
|
17
|
+
},
|
|
18
|
+
"include": [
|
|
19
|
+
"src/**/*"
|
|
20
|
+
],
|
|
21
|
+
"exclude": [
|
|
22
|
+
"node_modules",
|
|
23
|
+
"dist"
|
|
24
|
+
]
|
|
25
25
|
}
|
package/templates/web/README.md
CHANGED
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
# {{projectName}}
|
|
2
|
-
|
|
3
|
-
{{description}}
|
|
4
|
-
|
|
5
|
-
## Getting Started
|
|
6
|
-
|
|
7
|
-
This is a React web application built with the Idealyst Framework and Vite.
|
|
8
|
-
|
|
9
|
-
### Prerequisites
|
|
10
|
-
|
|
11
|
-
- Node.js 18+
|
|
12
|
-
- Yarn
|
|
13
|
-
|
|
14
|
-
### Installation
|
|
15
|
-
|
|
16
|
-
Install dependencies:
|
|
17
|
-
```bash
|
|
18
|
-
yarn install
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
### Development
|
|
22
|
-
|
|
23
|
-
Start the development server:
|
|
24
|
-
```bash
|
|
25
|
-
yarn dev
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
The app will be available at `http://localhost:3000`
|
|
29
|
-
|
|
30
|
-
### Building for Production
|
|
31
|
-
|
|
32
|
-
Build the app:
|
|
33
|
-
```bash
|
|
34
|
-
yarn build
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
Preview the production build:
|
|
38
|
-
```bash
|
|
39
|
-
yarn preview
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Project Structure
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
{{projectName}}/
|
|
46
|
-
├── src/
|
|
47
|
-
│ ├── App.tsx # Main app component
|
|
48
|
-
│ └── main.tsx # App entry point
|
|
49
|
-
├── index.html # HTML template
|
|
50
|
-
├── vite.config.ts # Vite configuration
|
|
51
|
-
└── tsconfig.json # TypeScript configuration
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
### Features
|
|
55
|
-
|
|
56
|
-
- **Idealyst Components**: Cross-platform UI components
|
|
57
|
-
- **Idealyst Navigation**: Consistent navigation system
|
|
58
|
-
- **Idealyst Theme**: Unified theming across platforms
|
|
59
|
-
- **React 19.1**: Latest React version
|
|
60
|
-
- **Vite**: Fast build tool and dev server
|
|
61
|
-
- **TypeScript**: Full type safety
|
|
62
|
-
- **React Native Web**: Use React Native components on the web
|
|
63
|
-
|
|
64
|
-
### Development
|
|
65
|
-
|
|
66
|
-
The app uses the Idealyst Framework for consistent UI and navigation that works across web and mobile platforms.
|
|
67
|
-
|
|
68
|
-
Edit `src/App.tsx` to start building your application.
|
|
69
|
-
|
|
70
|
-
### Styling
|
|
71
|
-
|
|
72
|
-
The app uses Unistyles for cross-platform styling. You can create styles that work on both web and mobile:
|
|
73
|
-
|
|
74
|
-
```tsx
|
|
75
|
-
import { createStyleSheet } from 'react-native-unistyles';
|
|
76
|
-
|
|
77
|
-
const styles = createStyleSheet({
|
|
78
|
-
container: {
|
|
79
|
-
flex: 1,
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
alignItems: 'center'
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
### Learn More
|
|
87
|
-
|
|
88
|
-
- [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
|
|
89
|
-
- [React Documentation](https://react.dev/)
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
This is a React web application built with the Idealyst Framework and Vite.
|
|
8
|
+
|
|
9
|
+
### Prerequisites
|
|
10
|
+
|
|
11
|
+
- Node.js 18+
|
|
12
|
+
- Yarn
|
|
13
|
+
|
|
14
|
+
### Installation
|
|
15
|
+
|
|
16
|
+
Install dependencies:
|
|
17
|
+
```bash
|
|
18
|
+
yarn install
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Development
|
|
22
|
+
|
|
23
|
+
Start the development server:
|
|
24
|
+
```bash
|
|
25
|
+
yarn dev
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The app will be available at `http://localhost:3000`
|
|
29
|
+
|
|
30
|
+
### Building for Production
|
|
31
|
+
|
|
32
|
+
Build the app:
|
|
33
|
+
```bash
|
|
34
|
+
yarn build
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Preview the production build:
|
|
38
|
+
```bash
|
|
39
|
+
yarn preview
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
### Project Structure
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
{{projectName}}/
|
|
46
|
+
├── src/
|
|
47
|
+
│ ├── App.tsx # Main app component
|
|
48
|
+
│ └── main.tsx # App entry point
|
|
49
|
+
├── index.html # HTML template
|
|
50
|
+
├── vite.config.ts # Vite configuration
|
|
51
|
+
└── tsconfig.json # TypeScript configuration
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
### Features
|
|
55
|
+
|
|
56
|
+
- **Idealyst Components**: Cross-platform UI components
|
|
57
|
+
- **Idealyst Navigation**: Consistent navigation system
|
|
58
|
+
- **Idealyst Theme**: Unified theming across platforms
|
|
59
|
+
- **React 19.1**: Latest React version
|
|
60
|
+
- **Vite**: Fast build tool and dev server
|
|
61
|
+
- **TypeScript**: Full type safety
|
|
62
|
+
- **React Native Web**: Use React Native components on the web
|
|
63
|
+
|
|
64
|
+
### Development
|
|
65
|
+
|
|
66
|
+
The app uses the Idealyst Framework for consistent UI and navigation that works across web and mobile platforms.
|
|
67
|
+
|
|
68
|
+
Edit `src/App.tsx` to start building your application.
|
|
69
|
+
|
|
70
|
+
### Styling
|
|
71
|
+
|
|
72
|
+
The app uses Unistyles for cross-platform styling. You can create styles that work on both web and mobile:
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
import { createStyleSheet } from 'react-native-unistyles';
|
|
76
|
+
|
|
77
|
+
const styles = createStyleSheet({
|
|
78
|
+
container: {
|
|
79
|
+
flex: 1,
|
|
80
|
+
justifyContent: 'center',
|
|
81
|
+
alignItems: 'center'
|
|
82
|
+
}
|
|
83
|
+
});
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Learn More
|
|
87
|
+
|
|
88
|
+
- [Idealyst Framework Documentation](https://github.com/your-username/idealyst-framework)
|
|
89
|
+
- [React Documentation](https://react.dev/)
|
|
90
90
|
- [Vite Documentation](https://vitejs.dev/)
|
package/templates/web/index.html
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
-
<title>{{projectName}}</title>
|
|
8
|
-
</head>
|
|
9
|
-
<body>
|
|
10
|
-
<div id="root"></div>
|
|
11
|
-
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
-
</body>
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
7
|
+
<title>{{projectName}}</title>
|
|
8
|
+
</head>
|
|
9
|
+
<body>
|
|
10
|
+
<div id="root"></div>
|
|
11
|
+
<script type="module" src="/src/main.tsx"></script>
|
|
12
|
+
</body>
|
|
13
13
|
</html>
|
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "{{packageName}}",
|
|
3
|
-
"version": "{{version}}",
|
|
4
|
-
"description": "{{description}}",
|
|
5
|
-
"private": true,
|
|
6
|
-
"type": "module",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"dev": "vite",
|
|
9
|
-
"build": "tsc && vite build",
|
|
10
|
-
"preview": "vite preview"
|
|
11
|
-
},
|
|
12
|
-
"dependencies": {
|
|
13
|
-
"@idealyst/components": "^1.0.3",
|
|
14
|
-
"@idealyst/navigation": "^1.0.3",
|
|
15
|
-
"@idealyst/theme": "^1.0.3",
|
|
16
|
-
"@mdi/js": "^7.4.47",
|
|
17
|
-
"@mdi/react": "^1.6.1",
|
|
18
|
-
"@react-native/normalize-colors": "^0.80.1",
|
|
19
|
-
"@types/react-router-dom": "^5.3.3",
|
|
20
|
-
"compression": "^1.7.4",
|
|
21
|
-
"express": "^4.18.2",
|
|
22
|
-
"react": "^19.1.0",
|
|
23
|
-
"react-dom": "^19.1.0",
|
|
24
|
-
"react-native": "^0.80.1",
|
|
25
|
-
"react-native-edge-to-edge": "^1.6.2",
|
|
26
|
-
"react-native-nitro-modules": "0.26.3",
|
|
27
|
-
"react-native-unistyles": "^3.0.4",
|
|
28
|
-
"react-native-web": "^0.20.0",
|
|
29
|
-
"react-router": "^7.6.3",
|
|
30
|
-
"react-router-dom": "^7.6.3",
|
|
31
|
-
"sirv": "^2.0.4"
|
|
32
|
-
},
|
|
33
|
-
"devDependencies": {
|
|
34
|
-
"@babel/core": "^7.28.0",
|
|
35
|
-
"@babel/preset-env": "^7.28.0",
|
|
36
|
-
"@babel/preset-react": "^7.27.1",
|
|
37
|
-
"@babel/preset-typescript": "^7.27.1",
|
|
38
|
-
"@types/compression": "^1.7.5",
|
|
39
|
-
"@types/express": "^4.17.21",
|
|
40
|
-
"@types/react": "^19.1.0",
|
|
41
|
-
"@types/react-dom": "^19.1.0",
|
|
42
|
-
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
43
|
-
"@typescript-eslint/parser": "^7.2.0",
|
|
44
|
-
"@vitejs/plugin-react": "^4.6.0",
|
|
45
|
-
"eslint": "^8.57.0",
|
|
46
|
-
"eslint-plugin-react-hooks": "^4.6.0",
|
|
47
|
-
"eslint-plugin-react-refresh": "^0.4.6",
|
|
48
|
-
"typescript": "^5.2.2",
|
|
49
|
-
"vite": "^5.2.0",
|
|
50
|
-
"vite-plugin-babel": "^1.3.2"
|
|
51
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "{{version}}",
|
|
4
|
+
"description": "{{description}}",
|
|
5
|
+
"private": true,
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"dev": "vite",
|
|
9
|
+
"build": "tsc && vite build",
|
|
10
|
+
"preview": "vite preview"
|
|
11
|
+
},
|
|
12
|
+
"dependencies": {
|
|
13
|
+
"@idealyst/components": "^1.0.3",
|
|
14
|
+
"@idealyst/navigation": "^1.0.3",
|
|
15
|
+
"@idealyst/theme": "^1.0.3",
|
|
16
|
+
"@mdi/js": "^7.4.47",
|
|
17
|
+
"@mdi/react": "^1.6.1",
|
|
18
|
+
"@react-native/normalize-colors": "^0.80.1",
|
|
19
|
+
"@types/react-router-dom": "^5.3.3",
|
|
20
|
+
"compression": "^1.7.4",
|
|
21
|
+
"express": "^4.18.2",
|
|
22
|
+
"react": "^19.1.0",
|
|
23
|
+
"react-dom": "^19.1.0",
|
|
24
|
+
"react-native": "^0.80.1",
|
|
25
|
+
"react-native-edge-to-edge": "^1.6.2",
|
|
26
|
+
"react-native-nitro-modules": "0.26.3",
|
|
27
|
+
"react-native-unistyles": "^3.0.4",
|
|
28
|
+
"react-native-web": "^0.20.0",
|
|
29
|
+
"react-router": "^7.6.3",
|
|
30
|
+
"react-router-dom": "^7.6.3",
|
|
31
|
+
"sirv": "^2.0.4"
|
|
32
|
+
},
|
|
33
|
+
"devDependencies": {
|
|
34
|
+
"@babel/core": "^7.28.0",
|
|
35
|
+
"@babel/preset-env": "^7.28.0",
|
|
36
|
+
"@babel/preset-react": "^7.27.1",
|
|
37
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
38
|
+
"@types/compression": "^1.7.5",
|
|
39
|
+
"@types/express": "^4.17.21",
|
|
40
|
+
"@types/react": "^19.1.0",
|
|
41
|
+
"@types/react-dom": "^19.1.0",
|
|
42
|
+
"@typescript-eslint/eslint-plugin": "^7.2.0",
|
|
43
|
+
"@typescript-eslint/parser": "^7.2.0",
|
|
44
|
+
"@vitejs/plugin-react": "^4.6.0",
|
|
45
|
+
"eslint": "^8.57.0",
|
|
46
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
47
|
+
"eslint-plugin-react-refresh": "^0.4.6",
|
|
48
|
+
"typescript": "^5.2.2",
|
|
49
|
+
"vite": "^5.2.0",
|
|
50
|
+
"vite-plugin-babel": "^1.3.2"
|
|
51
|
+
}
|
|
52
52
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { BrowserRouter } from 'react-router-dom';
|
|
2
|
-
import { ExampleStackRouter, } from '@idealyst/navigation/examples';
|
|
3
|
-
import { NavigatorProvider } from '@idealyst/navigation';
|
|
4
|
-
|
|
5
|
-
function App() {
|
|
6
|
-
return (
|
|
7
|
-
<div className="App">
|
|
8
|
-
<BrowserRouter>
|
|
9
|
-
<NavigatorProvider route={ExampleStackRouter} />
|
|
10
|
-
</BrowserRouter>
|
|
11
|
-
</div>
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
1
|
+
import { BrowserRouter } from 'react-router-dom';
|
|
2
|
+
import { ExampleStackRouter, } from '@idealyst/navigation/examples';
|
|
3
|
+
import { NavigatorProvider } from '@idealyst/navigation';
|
|
4
|
+
|
|
5
|
+
function App() {
|
|
6
|
+
return (
|
|
7
|
+
<div className="App">
|
|
8
|
+
<BrowserRouter>
|
|
9
|
+
<NavigatorProvider route={ExampleStackRouter} />
|
|
10
|
+
</BrowserRouter>
|
|
11
|
+
</div>
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
15
|
export default App;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import '@idealyst/navigation/examples/unistyles';
|
|
2
|
-
|
|
3
|
-
import * as React from 'react';
|
|
4
|
-
import ReactDOM from 'react-dom/client';
|
|
5
|
-
import App from './App.tsx';
|
|
6
|
-
|
|
7
|
-
// Hydrate the app if it's SSR, otherwise render normally
|
|
8
|
-
const container = document.getElementById('root')!;
|
|
9
|
-
|
|
10
|
-
if (container.hasChildNodes()) {
|
|
11
|
-
// If the container has child nodes, it means we're hydrating SSR content
|
|
12
|
-
ReactDOM.hydrateRoot(container,
|
|
13
|
-
<React.StrictMode>
|
|
14
|
-
<App />
|
|
15
|
-
</React.StrictMode>
|
|
16
|
-
);
|
|
17
|
-
} else {
|
|
18
|
-
// Otherwise, render normally (for development)
|
|
19
|
-
const root = ReactDOM.createRoot(container);
|
|
20
|
-
root.render(
|
|
21
|
-
<React.StrictMode>
|
|
22
|
-
<App />
|
|
23
|
-
</React.StrictMode>
|
|
24
|
-
);
|
|
1
|
+
import '@idealyst/navigation/examples/unistyles';
|
|
2
|
+
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import ReactDOM from 'react-dom/client';
|
|
5
|
+
import App from './App.tsx';
|
|
6
|
+
|
|
7
|
+
// Hydrate the app if it's SSR, otherwise render normally
|
|
8
|
+
const container = document.getElementById('root')!;
|
|
9
|
+
|
|
10
|
+
if (container.hasChildNodes()) {
|
|
11
|
+
// If the container has child nodes, it means we're hydrating SSR content
|
|
12
|
+
ReactDOM.hydrateRoot(container,
|
|
13
|
+
<React.StrictMode>
|
|
14
|
+
<App />
|
|
15
|
+
</React.StrictMode>
|
|
16
|
+
);
|
|
17
|
+
} else {
|
|
18
|
+
// Otherwise, render normally (for development)
|
|
19
|
+
const root = ReactDOM.createRoot(container);
|
|
20
|
+
root.render(
|
|
21
|
+
<React.StrictMode>
|
|
22
|
+
<App />
|
|
23
|
+
</React.StrictMode>
|
|
24
|
+
);
|
|
25
25
|
}
|
|
@@ -1,27 +1,27 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2020",
|
|
4
|
-
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
5
|
-
"module": "ESNext",
|
|
6
|
-
"skipLibCheck": true,
|
|
7
|
-
"moduleResolution": "node",
|
|
8
|
-
"allowImportingTsExtensions": true,
|
|
9
|
-
"isolatedModules": true,
|
|
10
|
-
"moduleDetection": "force",
|
|
11
|
-
"noEmit": true,
|
|
12
|
-
"jsx": "react-jsx",
|
|
13
|
-
"strict": true,
|
|
14
|
-
"noUnusedLocals": true,
|
|
15
|
-
"noUnusedParameters": true,
|
|
16
|
-
"noFallthroughCasesInSwitch": true,
|
|
17
|
-
"noUncheckedIndexedAccess": true,
|
|
18
|
-
"baseUrl": ".",
|
|
19
|
-
"paths": {
|
|
20
|
-
"@/*": ["./src/*"],
|
|
21
|
-
"react-native": ["node_modules/react-native-web"]
|
|
22
|
-
},
|
|
23
|
-
"types": ["vite/client"]
|
|
24
|
-
},
|
|
25
|
-
"include": ["src/**/*"],
|
|
26
|
-
"exclude": ["node_modules", "dist"]
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"target": "ES2020",
|
|
4
|
+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
|
|
5
|
+
"module": "ESNext",
|
|
6
|
+
"skipLibCheck": true,
|
|
7
|
+
"moduleResolution": "node",
|
|
8
|
+
"allowImportingTsExtensions": true,
|
|
9
|
+
"isolatedModules": true,
|
|
10
|
+
"moduleDetection": "force",
|
|
11
|
+
"noEmit": true,
|
|
12
|
+
"jsx": "react-jsx",
|
|
13
|
+
"strict": true,
|
|
14
|
+
"noUnusedLocals": true,
|
|
15
|
+
"noUnusedParameters": true,
|
|
16
|
+
"noFallthroughCasesInSwitch": true,
|
|
17
|
+
"noUncheckedIndexedAccess": true,
|
|
18
|
+
"baseUrl": ".",
|
|
19
|
+
"paths": {
|
|
20
|
+
"@/*": ["./src/*"],
|
|
21
|
+
"react-native": ["node_modules/react-native-web"]
|
|
22
|
+
},
|
|
23
|
+
"types": ["vite/client"]
|
|
24
|
+
},
|
|
25
|
+
"include": ["src/**/*"],
|
|
26
|
+
"exclude": ["node_modules", "dist"]
|
|
27
27
|
}
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
import { defineConfig } from 'vite'
|
|
2
|
-
import react from '@vitejs/plugin-react'
|
|
3
|
-
import babel from 'vite-plugin-babel'
|
|
4
|
-
import path from 'path'
|
|
5
|
-
|
|
6
|
-
// https://vitejs.dev/config/
|
|
7
|
-
export default defineConfig({
|
|
8
|
-
plugins: [
|
|
9
|
-
babel({
|
|
10
|
-
filter: (id) => id.includes('node_modules/@idealyst/') && /\.(js|jsx|ts|tsx)$/.test(id),
|
|
11
|
-
babelConfig: {
|
|
12
|
-
presets: [
|
|
13
|
-
['@babel/preset-typescript', {
|
|
14
|
-
isTSX: true,
|
|
15
|
-
allExtensions: true,
|
|
16
|
-
}]
|
|
17
|
-
],
|
|
18
|
-
plugins: [
|
|
19
|
-
['react-native-unistyles/plugin', {
|
|
20
|
-
root: 'src',
|
|
21
|
-
autoProcessPaths: ['@idealyst/components', '@idealyst/navigation', '@idealyst/theme'],
|
|
22
|
-
}],
|
|
23
|
-
['@idealyst/components/plugin/web', { root: 'src' }]
|
|
24
|
-
]
|
|
25
|
-
}
|
|
26
|
-
}),
|
|
27
|
-
// Then process everything else with React plugin
|
|
28
|
-
react(),
|
|
29
|
-
],
|
|
30
|
-
resolve: {
|
|
31
|
-
alias: {
|
|
32
|
-
// Use absolute path to resolve react-native-web properly
|
|
33
|
-
'react-native': path.resolve(__dirname, 'node_modules/react-native-web'),
|
|
34
|
-
'@react-native/normalize-colors': path.resolve(__dirname, 'node_modules/@react-native/normalize-colors'),
|
|
35
|
-
},
|
|
36
|
-
// Platform-specific file resolution
|
|
37
|
-
extensions: ['.web.tsx', '.web.ts', '.tsx', '.ts', '.js', '.jsx'],
|
|
38
|
-
// Ensure proper resolution of package exports
|
|
39
|
-
conditions: ['browser', 'import', 'module', 'default']
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
'react-native-
|
|
50
|
-
'react-native-
|
|
51
|
-
'
|
|
52
|
-
'
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
'
|
|
58
|
-
'
|
|
59
|
-
'@idealyst/
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
1
|
+
import { defineConfig } from 'vite'
|
|
2
|
+
import react from '@vitejs/plugin-react'
|
|
3
|
+
import babel from 'vite-plugin-babel'
|
|
4
|
+
import path from 'path'
|
|
5
|
+
|
|
6
|
+
// https://vitejs.dev/config/
|
|
7
|
+
export default defineConfig({
|
|
8
|
+
plugins: [
|
|
9
|
+
babel({
|
|
10
|
+
filter: (id) => id.includes('node_modules/@idealyst/') && /\.(js|jsx|ts|tsx)$/.test(id),
|
|
11
|
+
babelConfig: {
|
|
12
|
+
presets: [
|
|
13
|
+
['@babel/preset-typescript', {
|
|
14
|
+
isTSX: true,
|
|
15
|
+
allExtensions: true,
|
|
16
|
+
}]
|
|
17
|
+
],
|
|
18
|
+
plugins: [
|
|
19
|
+
['react-native-unistyles/plugin', {
|
|
20
|
+
root: 'src',
|
|
21
|
+
autoProcessPaths: ['@idealyst/components', '@idealyst/navigation', '@idealyst/theme'],
|
|
22
|
+
}],
|
|
23
|
+
['@idealyst/components/plugin/web', { root: 'src' }]
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}),
|
|
27
|
+
// Then process everything else with React plugin
|
|
28
|
+
react(),
|
|
29
|
+
],
|
|
30
|
+
resolve: {
|
|
31
|
+
alias: {
|
|
32
|
+
// Use absolute path to resolve react-native-web properly
|
|
33
|
+
'react-native': path.resolve(__dirname, 'node_modules/react-native-web'),
|
|
34
|
+
'@react-native/normalize-colors': path.resolve(__dirname, 'node_modules/@react-native/normalize-colors'),
|
|
35
|
+
},
|
|
36
|
+
// Platform-specific file resolution
|
|
37
|
+
extensions: ['.web.tsx', '.web.ts', '.tsx', '.ts', '.js', '.jsx'],
|
|
38
|
+
// Ensure proper resolution of package exports
|
|
39
|
+
conditions: ['browser', 'import', 'module', 'default'],
|
|
40
|
+
// Ensure workspace dependencies resolve properly
|
|
41
|
+
preserveSymlinks: false
|
|
42
|
+
},
|
|
43
|
+
define: {
|
|
44
|
+
global: 'globalThis',
|
|
45
|
+
__DEV__: JSON.stringify(true),
|
|
46
|
+
},
|
|
47
|
+
optimizeDeps: {
|
|
48
|
+
include: [
|
|
49
|
+
'react-native-web',
|
|
50
|
+
'@react-native/normalize-colors',
|
|
51
|
+
'react-native-unistyles',
|
|
52
|
+
'react-native-unistyles/web',
|
|
53
|
+
'@mdi/react',
|
|
54
|
+
'@mdi/js',
|
|
55
|
+
],
|
|
56
|
+
exclude: [
|
|
57
|
+
'react-native-edge-to-edge',
|
|
58
|
+
'react-native-nitro-modules',
|
|
59
|
+
'@idealyst/components',
|
|
60
|
+
'@idealyst/navigation',
|
|
61
|
+
'@idealyst/theme',
|
|
62
|
+
'@testproject/shared',
|
|
63
|
+
],
|
|
64
|
+
},
|
|
65
|
+
server: {
|
|
66
|
+
host: '0.0.0.0',
|
|
67
|
+
port: 5173,
|
|
68
|
+
},
|
|
66
69
|
})
|