diff --git a/README.md b/README.md index 898ddc37..533574ed 100644 --- a/README.md +++ b/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 +openstapps-core-tools schema ``` + where: - `` is path to the project (where used `*.ts` files are, e.g. `src/core`, - `` 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 [reportPath] +openstapps-core-tools validate [reportPath] ``` + where: - `` is a directory where JSON schema files are, e.g. `lib/schema`, - `` 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