mirror of
https://gitlab.com/openstapps/openstapps.git
synced 2026-01-07 05:52:57 +00:00
docs: adjust readme to reflect changes
This commit is contained in:
20
README.md
20
README.md
@@ -26,15 +26,17 @@ Add `@validatable` to the Typedoc comment of the types that you want to convert
|
||||
The command `openstapps-core-tools` can then be called using these arguments:
|
||||
|
||||
```shell
|
||||
node_modules/.bin/openstapps-core-tools schema <srcPath> <schemaPath>
|
||||
openstapps-core-tools schema <srcPath> <schemaPath>
|
||||
```
|
||||
|
||||
where:
|
||||
- `<srcPath>` is path to the project (where used `*.ts` files are, e.g. `src/core`,
|
||||
- `<schemaPath>` is directory to save output files to, e.g. `lib/schema`.
|
||||
|
||||
Complete command with the example arguments is then:
|
||||
|
||||
```shell
|
||||
node_modules/.bin/openstapps-core-tools schema src/core lib/schema
|
||||
openstapps-core-tools schema src/core lib/schema
|
||||
```
|
||||
|
||||
Inside of a script in `package.json` or if the npm package is installed globally, the tool `stapps-convert` can be called without its local path (`node_modules/.bin`):
|
||||
@@ -105,16 +107,18 @@ Where `errorNames` holds the string values of the name property of the expected
|
||||
The command `openstapps-core-tools` can then be called using these arguments:
|
||||
|
||||
```shell
|
||||
node_modules/.bin/openstapps-core-tools validate <schemaPath> <testPath> [reportPath]
|
||||
openstapps-core-tools validate <schemaPath> <testPath> [reportPath]
|
||||
```
|
||||
|
||||
where:
|
||||
- `<schemaPath>` is a directory where JSON schema files are, e.g. `lib/schema`,
|
||||
- `<testPath>` is a directory where test files are, e.g. `src/test/resources`,
|
||||
- `[reportPath]` is a file where the HTML report of the validation will be saved to, e.g. `report.html` (optional argument - if it's not provided no report will be written).
|
||||
|
||||
Command with the example arguments is then for example:
|
||||
|
||||
```shell
|
||||
node_modules/.bin/openstapps-core-tools validate lib/schema src/test/resources
|
||||
openstapps-core-tools validate lib/schema src/test/resources
|
||||
```
|
||||
|
||||
Inside of a script in `package.json` or if the npm package is installed globally, the tool `openstapps-validate` can be called without its local path (`node_modules/.bin`):
|
||||
@@ -123,14 +127,12 @@ Inside of a script in `package.json` or if the npm package is installed globally
|
||||
openstapps-core-tools validate lib/schema src/test/resources report.html
|
||||
```
|
||||
|
||||
## Generate documentation for routes
|
||||
## Generate documentation for routes
|
||||
|
||||
To generate a documentation for the routes use the following command in the root directory of your StAppsCore.
|
||||
|
||||
The generator relies on dynamic imports and must therefore be run this way.
|
||||
To generate a documentation for the routes use the following command.
|
||||
|
||||
```shell
|
||||
node --require ts-node/register node_modules/@openstapps/core-tools/src/cli.ts routes PATH/TO/ROUTES.md
|
||||
openstapps-core-tools routes PATH/TO/CORE PATH/TO/ROUTES.md
|
||||
```
|
||||
|
||||
## Pack definitions and implementations
|
||||
|
||||
Reference in New Issue
Block a user