Create listen script for payload types
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
tobias 2024-05-21 11:39:10 +02:00
parent b91dd893a4
commit 2a494425ad
2 changed files with 5 additions and 2 deletions

View File

@ -4,7 +4,9 @@
"license": "AGPL-3.0-or-later", "license": "AGPL-3.0-or-later",
"version": "1.2", "version": "1.2",
"scripts": { "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", "stop": "docker compose down",
"dev:nobuild": "docker compose up" "dev:nobuild": "docker compose up"
} }

View File

@ -10,7 +10,8 @@
"build:server": "tsc", "build:server": "tsc",
"build": "yarn build:payload && yarn build:server", "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", "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": { "dependencies": {
"cross-env": "^7.0.3", "cross-env": "^7.0.3",