diff --git a/tdrive/backend/node/README.md b/tdrive/backend/node/README.md index a6c8b818..c084b8c5 100644 --- a/tdrive/backend/node/README.md +++ b/tdrive/backend/node/README.md @@ -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 diff --git a/tdrive/backend/node/package.json b/tdrive/backend/node/package.json index b55c188f..3b354f95 100644 --- a/tdrive/backend/node/package.json +++ b/tdrive/backend/node/package.json @@ -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",