From eda1059d2bd9d9f64f7bce55d1edb299d9a9a527 Mon Sep 17 00:00:00 2001 From: "Zed A. Shaw" Date: Wed, 28 Dec 2022 16:07:47 +0700 Subject: [PATCH] A weird problem with nodemon where it constantly cycles on the first docs run. I'll have to resolve this differently. --- commands/init.js | 4 ++++ package.json | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/commands/init.js b/commands/init.js index 904dd5f..e8bf17c 100755 --- a/commands/init.js +++ b/commands/init.js @@ -49,6 +49,10 @@ export const main = async (opts) => { good("Starting redis for your OS so you can register an admin."); devsvc({start: true, noexit: true}); + good("Generating the documentation first time..."); + exec("npm run docs"); + good("Documentation done."); + good("Migrating your database just in case."); exec("npm run knex migrate:latest") good("In another window start the app server with: npm run DANGER_ADMIN"); diff --git a/package.json b/package.json index 91b2e95..45cd6e8 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "scripts": { "dev": "run-p -l -n api queue watch tracker rendered-watch", - "DANGER_ADMIN": "cross-env DANGER_ADMIN=1 run-p -l -n api queue tracker watch rendered-watch docs", + "DANGER_ADMIN": "cross-env DANGER_ADMIN=1 run-p -l -n api queue tracker watch rendered-watch docs-watch", "prod": "run-p api queue", "tracker": "node ./bando.js tracker", "build": "node ./bando.js build --config build.prod.json", @@ -17,7 +17,8 @@ "api": "nodemon ./bando.js api", "queue": "nodemon ./bando.js queue", "test": "npx ava tests/**/*.js", - "docs": "nodemon bando.js codedoc --output public/docs/api 'lib/*.js' 'client/*.js' 'commands/*.js' 'api/*.js' 'api/**/*.js' 'queues/*.js' 'socket/*.js'", + "docs": "node bando.js codedoc --output public/docs/api 'lib/*.js' 'client/*.js' 'commands/*.js' 'api/*.js' 'api/**/*.js' 'queues/*.js' 'socket/*.js'", + "docs-watch": "nodemon bando.js codedoc --output public/docs/api 'lib/*.js' 'client/*.js' 'commands/*.js' 'api/*.js' 'api/**/*.js' 'queues/*.js' 'socket/*.js'", "modules": "./bando.js load", "modules-watch": "nodemon --watch ../ljsthw-private/db/modules/ --ext .md,.js,.sh ./bando.js load", "rendered-watch": "nodemon --ignore \"rendered/build/**/*\" --watch ./rendered --watch static -e md,svelte,js,css ./bando.js rendered",