diff --git a/package.json b/package.json index 739ca0f..ed7c0f2 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,9 @@ "license": "AGPL-3.0-or-later", "version": "1.2", "scripts": { - "dev": "docker compose up --build", + "dev": "yarn dev:docker & yarn payload:types", + "dev:docker": "docker compose up --build", + "payload:types": "yarn --cwd ./payload run generate:types:listen", "stop": "docker compose down", "dev:nobuild": "docker compose up" } diff --git a/payload/package.json b/payload/package.json index dd2d3c3..34abc92 100644 --- a/payload/package.json +++ b/payload/package.json @@ -10,7 +10,8 @@ "build:server": "tsc", "build": "yarn build:payload && yarn build:server", "serve": "cross-env PAYLOAD_CONFIG_PATH=dist/payload.config.js node -r tsconfig-paths/register dist/server.js", - "generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts node -r tsconfig-paths/register node_modules/payload/dist/bin/index.js generate:types" + "generate:types": "cross-env PAYLOAD_CONFIG_PATH=src/payload.config.ts node -r tsconfig-paths/register node_modules/payload/dist/bin/index.js generate:types", + "generate:types:listen": "nodemon --watch src --ext ts --exec 'npm run generate:types'" }, "dependencies": { "cross-env": "^7.0.3",