@simitgroup/simpleapp-generator 1.0.38 → 1.0.40
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
CHANGED
|
@@ -1,3 +1,46 @@
|
|
|
1
|
+
# Quick start
|
|
2
|
+
1. create project folder
|
|
3
|
+
```sh
|
|
4
|
+
mkdir project1
|
|
5
|
+
cd project1
|
|
6
|
+
```
|
|
7
|
+
2. install simpleapp-generator
|
|
8
|
+
```sh
|
|
9
|
+
npm install -g @simitgroup/simpleapp-generator
|
|
10
|
+
```
|
|
11
|
+
3. init project folder, it will create some samples too
|
|
12
|
+
```sh
|
|
13
|
+
simpleapp-generator -g init
|
|
14
|
+
```
|
|
15
|
+
4. prepare backend
|
|
16
|
+
```sh
|
|
17
|
+
sh build.sh backend
|
|
18
|
+
cd backend
|
|
19
|
+
pnpm start:dev
|
|
20
|
+
```
|
|
21
|
+
5. prepare frontend
|
|
22
|
+
```sh
|
|
23
|
+
sh build.sh frontend
|
|
24
|
+
cd frontend
|
|
25
|
+
pnpm start
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
# Perform Development
|
|
29
|
+
1. add some schemas from project1/schemas
|
|
30
|
+
2. then run
|
|
31
|
+
```sh
|
|
32
|
+
sh build.sh updatebackend
|
|
33
|
+
sh build.sh updatefrontend
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
1
44
|
todo:
|
|
2
45
|
## high priority Job
|
|
3
46
|
|
|
@@ -386,7 +429,7 @@ document level property
|
|
|
386
429
|
// auto generate fields
|
|
387
430
|
documentType: 'SI',
|
|
388
431
|
documentName: 'Sales Invoice',
|
|
389
|
-
|
|
432
|
+
|
|
390
433
|
//auto generated foreign keys catalogue
|
|
391
434
|
"foreignKeys":{ "customer":["$.customer._id"], "user":[{"$.preparedby._id"},{$.approveby._id"}]}
|
|
392
435
|
},
|
package/package.json
CHANGED
|
@@ -7,13 +7,16 @@ npx prettier --write jsonschemas
|
|
|
7
7
|
|
|
8
8
|
if [ $type == 'frontend' ]; then
|
|
9
9
|
simpleapp-generator -c config.json -g frontend
|
|
10
|
+
cp -a ./shares frontend/simpleapp/generate
|
|
10
11
|
elif [ $type == 'updatefrontend' ]; then
|
|
11
12
|
simpleapp-generator -c config.json -g updatefrontend
|
|
13
|
+
cp -a ./shares frontend/simpleapp/generate
|
|
12
14
|
elif [ $type == 'backend' ]; then
|
|
13
15
|
simpleapp-generator -c config.json -g backend
|
|
16
|
+
cp -a ./shares backend/src/simpleapp/generate
|
|
14
17
|
elif [ $type == 'updatebackend' ]; then
|
|
15
18
|
simpleapp-generator -c config.json -g updatebackend
|
|
19
|
+
cp -a ./shares backend/src/simpleapp/generate
|
|
16
20
|
fi
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
cp -a ./shares frontend/simpleapp/generate
|
|
22
|
+
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
//examples
|
|
2
|
+
import {SchemaType,RESTMethods,IsolationType} from '/usr/local/lib/node_modules/@simitgroup/simpleapp-generator/src/type'
|
|
2
3
|
export const category:SchemaType =
|
|
3
4
|
{
|
|
4
5
|
type: "object",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//examples
|
|
2
|
-
import {SchemaType,RESTMethods,IsolationType} from '/
|
|
2
|
+
import {SchemaType,RESTMethods,IsolationType} from '/usr/local/lib/node_modules/@simitgroup/simpleapp-generator/src/type'
|
|
3
3
|
export const product:SchemaType =
|
|
4
4
|
{
|
|
5
5
|
type: "object",
|