Skip to content

Commit

Permalink
Revert "refactor: move codegen command and config to libs/sdk"
Browse files Browse the repository at this point in the history
This reverts commit 5e02f04.
  • Loading branch information
beeman committed Jan 21, 2024
1 parent 7f754f9 commit 95c5026
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 24 deletions.
8 changes: 3 additions & 5 deletions libs/sdk/src/codegen.ts → codegen.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
import type { CodegenConfig } from '@graphql-codegen/cli'
import { join } from 'node:path'
import * as process from 'process'

const config: CodegenConfig = {
overwrite: true,
schema: join(process.cwd(), './api-schema.graphql'),
documents: ['./graphql/**/*.graphql'],
schema: './api-schema.graphql',
documents: ['libs/sdk/src/graphql/**/*.graphql'],
generates: {
'./generated/graphql-sdk.ts': {
'libs/sdk/src/generated/graphql-sdk.ts': {
plugins: [
'typescript',
'typescript-operations',
Expand Down
12 changes: 0 additions & 12 deletions libs/sdk/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,6 @@
"sourceRoot": "libs/sdk/src",
"projectType": "library",
"targets": {
"generate": {
"executor": "nx:run-commands",
"options": {
"command": "graphql-codegen --config libs/sdk/src/codegen.ts"
}
},
"serve": {
"executor": "nx:run-commands",
"options": {
"command": "nx run sdk:generate --watch"
}
},
"build": {
"executor": "@nx/js:tsc",
"outputs": ["{options.outputPath}"],
Expand Down
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,14 @@
"anchor:build": "nx run anchor:anchor build",
"anchor:test": "nx run anchor:anchor test",
"anchor:localnet": "nx run anchor:anchor localnet",
"build:api": "nx run api:build",
"build:sdk": "nx run sdk:generate",
"build:web": "nx run web:build",
"dev": "nx run-many --target serve",
"dev:api": "nx run api:serve",
"dev:sdk": "nx run sdk:generate --watch",
"build:api": "nx build api",
"build:sdk": "graphql-codegen --config codegen.ts",
"build:web": "nx build web",
"dev:api": "nx serve api",
"dev:sdk": "pnpm build:sdk --watch",
"dev:services": "docker compose up",
"dev:services:stop": "docker compose down",
"dev:web": "nx run web:serve",
"dev:web": "nx serve web",
"docker:build:api": "docker build . -t ghcr.io/pubkeyapp/pubkey-stack",
"docker:push:api": "docker push ghcr.io/pubkeyapp/pubkey-stack",
"docker:run:api": "docker run -it -p 8000:3000 ghcr.io/pubkeyapp/pubkey-stack",
Expand Down

0 comments on commit 95c5026

Please sign in to comment.