🧑‍💻 backend package.json: Added scripts for continuous builds of code and running the CLI

This commit is contained in:
Eric Doughty-Papassideris
2024-03-26 12:06:22 +01:00
committed by ericlinagora
parent 9a05e9cf23
commit bb269102df
2 changed files with 5 additions and 0 deletions
+3
View File
@@ -43,6 +43,9 @@ The Twake backend CLI
The Twake backend CLI provides a set of commands to manage/use/develop Tdrive from the `twake-cli` executable.
Before using the CLI, you must `compile` Tdrive with `npm run build`. Once done, you can get help on on any command with the `--help` flag like `bin/twake-cli --help`.
To have prettied output when using verbose, you can use the npm script instead, (but don't forget the `--` before
arguments): `npm run cli -- --help`. You still need to compile the cli separately.
It uses the same configuration as the Tdrive backend application. Including environment variables and the `./config/default.json` file.
#### The 'search index' command
+2
View File
@@ -9,6 +9,8 @@
"build:copy-assets": "npm run build:copy-config && npm run build:copy-templates",
"build:copy-config": "cp -R config dist",
"build:copy-templates": "cpy src/**/*.eta dist/",
"build:watch": "npm run build:clean && npm run build:copy-assets && tsc-watch --project . --noClear --outDir ./dist",
"cli": "__tdcli() { bin/twake-cli \"$@\" | pino-pretty ; } ; __tdcli",
"dev": "tsc-watch --project . --noClear --outDir ./dist --onSuccess \"nodemon ./dist/server.js\" | pino-pretty",
"dev:cli": "tsc-watch --project . --noClear --outDir ./dist --onSuccess \"nodemon ./dist/cli/index.js workspace user\" | pino-pretty",
"dev:cli-dry": "tsc-watch --project . --noClear --outDir ./dist --onSuccess \"nodemon ./dist/cli/index.js console merge --dry\" | pino-pretty",