@idealyst/cli 1.0.2
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 +110 -0
- package/dist/index.js +287 -0
- package/dist/types/generators/index.d.ts +6 -0
- package/dist/types/generators/native.d.ts +2 -0
- package/dist/types/generators/shared.d.ts +2 -0
- package/dist/types/generators/utils.d.ts +11 -0
- package/dist/types/generators/web.d.ts +2 -0
- package/dist/types/generators/workspace.d.ts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/types.d.ts +13 -0
- package/package.json +59 -0
- package/templates/native/README.md +86 -0
- package/templates/native/app.json +5 -0
- package/templates/native/babel.config.js +14 -0
- package/templates/native/index.js +9 -0
- package/templates/native/metro.config.js +11 -0
- package/templates/native/package.json +70 -0
- package/templates/native/src/App.tsx +35 -0
- package/templates/native/tsconfig.json +30 -0
- package/templates/shared/README.md +109 -0
- package/templates/shared/package.json +42 -0
- package/templates/shared/rollup.config.js +27 -0
- package/templates/shared/src/components/SharedComponent.tsx +25 -0
- package/templates/shared/src/components/index.ts +1 -0
- package/templates/shared/src/index.ts +7 -0
- package/templates/shared/src/types/index.ts +7 -0
- package/templates/shared/src/utils/helpers.ts +32 -0
- package/templates/shared/src/utils/index.ts +1 -0
- package/templates/shared/tsconfig.json +25 -0
- package/templates/web/README.md +91 -0
- package/templates/web/index.html +13 -0
- package/templates/web/package.json +51 -0
- package/templates/web/src/App.tsx +39 -0
- package/templates/web/src/main.tsx +11 -0
- package/templates/web/tsconfig.json +27 -0
- package/templates/web/vite.config.ts +23 -0
- package/templates/workspace/README.md +78 -0
- package/templates/workspace/package.json +25 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { defineConfig } from 'vite';
|
|
2
|
+
import react from '@vitejs/plugin-react';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
|
|
5
|
+
// https://vitejs.dev/config/
|
|
6
|
+
export default defineConfig({
|
|
7
|
+
plugins: [react()],
|
|
8
|
+
resolve: {
|
|
9
|
+
alias: {
|
|
10
|
+
'@': path.resolve(__dirname, './src'),
|
|
11
|
+
'react-native$': 'react-native-web',
|
|
12
|
+
'react-native-web$': 'react-native-web'
|
|
13
|
+
},
|
|
14
|
+
extensions: ['.web.js', '.web.ts', '.web.tsx', '.js', '.ts', '.tsx', '.json']
|
|
15
|
+
},
|
|
16
|
+
define: {
|
|
17
|
+
global: 'globalThis'
|
|
18
|
+
},
|
|
19
|
+
server: {
|
|
20
|
+
port: 3000,
|
|
21
|
+
host: true
|
|
22
|
+
}
|
|
23
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# {{projectName}}
|
|
2
|
+
|
|
3
|
+
{{description}}
|
|
4
|
+
|
|
5
|
+
## Getting Started
|
|
6
|
+
|
|
7
|
+
This workspace contains your Idealyst Framework packages and applications.
|
|
8
|
+
|
|
9
|
+
### Structure
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
{{projectName}}/
|
|
13
|
+
├── packages/ # Shared packages
|
|
14
|
+
│ ├── theme/ # Theme configuration
|
|
15
|
+
│ ├── components/ # UI components
|
|
16
|
+
│ └── utils/ # Shared utilities
|
|
17
|
+
└── apps/ # Applications
|
|
18
|
+
├── mobile/ # React Native app
|
|
19
|
+
└── web/ # React web app
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
### Development
|
|
23
|
+
|
|
24
|
+
Install dependencies:
|
|
25
|
+
```bash
|
|
26
|
+
yarn install
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Build all packages:
|
|
30
|
+
```bash
|
|
31
|
+
yarn build:all
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Test all packages:
|
|
35
|
+
```bash
|
|
36
|
+
yarn test:all
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
### Adding Applications
|
|
40
|
+
|
|
41
|
+
Generate a new React Native app:
|
|
42
|
+
```bash
|
|
43
|
+
idealyst create mobile-app --type native
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Generate a new React web app:
|
|
47
|
+
```bash
|
|
48
|
+
idealyst create web-app --type web
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Generate a new shared library:
|
|
52
|
+
```bash
|
|
53
|
+
idealyst create shared-lib --type shared
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Publishing
|
|
57
|
+
|
|
58
|
+
Publish all packages:
|
|
59
|
+
```bash
|
|
60
|
+
yarn publish:all
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Version Management
|
|
64
|
+
|
|
65
|
+
Update patch version for all packages:
|
|
66
|
+
```bash
|
|
67
|
+
yarn version:patch
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Update minor version for all packages:
|
|
71
|
+
```bash
|
|
72
|
+
yarn version:minor
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Update major version for all packages:
|
|
76
|
+
```bash
|
|
77
|
+
yarn version:major
|
|
78
|
+
```
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "{{packageName}}",
|
|
3
|
+
"version": "{{version}}",
|
|
4
|
+
"description": "{{description}}",
|
|
5
|
+
"private": true,
|
|
6
|
+
"workspaces": [
|
|
7
|
+
"packages/*"
|
|
8
|
+
],
|
|
9
|
+
"packageManager": "yarn@4.0.2",
|
|
10
|
+
"scripts": {
|
|
11
|
+
"publish:all": "yarn workspaces foreach --include '@/*' npm publish",
|
|
12
|
+
"version:patch": "yarn workspaces foreach --include '@/*' version patch",
|
|
13
|
+
"version:minor": "yarn workspaces foreach --include '@/*' version minor",
|
|
14
|
+
"version:major": "yarn workspaces foreach --include '@/*' version major",
|
|
15
|
+
"build:all": "yarn workspaces foreach --include '@/*' run build",
|
|
16
|
+
"test:all": "yarn workspaces foreach --include '@/*' run test"
|
|
17
|
+
},
|
|
18
|
+
"devDependencies": {
|
|
19
|
+
"@babel/core": "^7.28.0",
|
|
20
|
+
"@babel/preset-env": "^7.28.0",
|
|
21
|
+
"@babel/preset-react": "^7.27.1",
|
|
22
|
+
"@babel/preset-typescript": "^7.27.1",
|
|
23
|
+
"typescript": "^5.0.0"
|
|
24
|
+
}
|
|
25
|
+
}
|