Skip to content

Commit eee11cc

Browse files
committed
simplify build, fixes #3335
1 parent e4a3620 commit eee11cc

File tree

5 files changed

+12
-21
lines changed

5 files changed

+12
-21
lines changed

package.json

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,13 @@
3333
"npm": "please_use_yarn_instead"
3434
},
3535
"scripts": {
36-
"build": "yarn build:clean && yarn build:cm6-graphql && yarn build:packages && yarn build:graphiql-react && yarn build:graphiql-plugin-explorer && yarn build:graphiql-plugin-code-exporter && yarn build:graphiql",
37-
"build-bundles": "yarn prebuild-bundles && wsrun -p -m -s build-bundles",
36+
"build": "yarn build-clean && yarn tsc && yarn build:nontsc",
37+
"build-bundles": "yarn prebuild-bundles && yarn wsrun:noexamples --stages build-bundles",
3838
"build-bundles-clean": "rimraf '{packages,examples,plugins}/**/{bundle,cdn,webpack}' && yarn workspace graphiql build-bundles-clean",
39-
"build-clean": "wsrun -m build-clean",
39+
"build-clean": "yarn tsc --clean",
4040
"build-docs": "rimraf packages/graphiql/typedoc && typedoc packages",
41-
"build:clean": "yarn tsc --clean && yarn tsc --clean resources/tsconfig.graphiql.json",
42-
"build:cm6-graphql": "yarn workspace cm6-graphql build",
43-
"build:graphiql": "yarn tsc resources/tsconfig.graphiql.json",
44-
"build:graphiql-plugin-explorer": "yarn workspace @graphiql/plugin-explorer build",
45-
"build:graphiql-plugin-code-exporter": "yarn workspace @graphiql/plugin-code-exporter build",
46-
"build:graphiql-react": "yarn workspace @graphiql/react build",
47-
"build:packages": "yarn tsc",
41+
"build:nontsc": "yarn wsrun:noexamples --exclude-missing --serial build",
42+
"build:clean": "yarn tsc --clean",
4843
"build:watch": "yarn tsc --watch",
4944
"build-demo": "wsrun -m build-demo",
5045
"watch": "yarn build:watch",
@@ -63,9 +58,9 @@
6358
"lint-cspell": "cspell --unique --no-progress --no-must-find-files",
6459
"lint-fix": "yarn eslint --fix",
6560
"postinstall": "patch-package --patch-dir resources/patches",
66-
"postbuild": "yarn workspace codemirror-graphql postbuild && yarn workspace monaco-graphql postbuild",
6761
"prebuild-bundles": "yarn build-bundles-clean",
6862
"prepublishOnly": "./scripts/prepublish.sh",
63+
"postbuild": "wsrun --exclude-missing postbuild",
6964
"pretty": "yarn pretty-check --write",
7065
"pretty-check": "prettier --cache --check --ignore-path .gitignore --ignore-path .eslintignore .",
7166
"ci:version": "yarn changeset version && yarn build && yarn format",
@@ -74,14 +69,13 @@
7469
"repo:lint": "manypkg check",
7570
"repo:fix": "manypkg fix",
7671
"repo:resolve": "node scripts/set-resolution.js",
77-
"start-graphiql": "yarn workspace graphiql dev",
78-
"start-monaco": "yarn workspace example-monaco-graphql-webpack start",
7972
"t": "yarn test",
8073
"test": "yarn jest",
8174
"test:ci": "yarn build && jest --coverage && yarn workspace monaco-graphql test",
8275
"test:coverage": "yarn jest --coverage",
8376
"test:watch": "yarn jest --watch",
84-
"tsc": "tsc --build"
77+
"tsc": "tsc --build",
78+
"wsrun:noexamples": "wsrun --exclude-missing --exclude example-monaco-graphql-react-vite --exclude example-monaco-graphql-nextjs --exclude example-monaco-graphql-webpack --exclude example-graphiql-webpack"
8579
},
8680
"devDependencies": {
8781
"@arthurgeron/eslint-plugin-react-usememo": "^1.1.4",

packages/codemirror-graphql/package.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,8 @@
3535
"!jest.config.js"
3636
],
3737
"scripts": {
38-
"build": "yarn build-clean && yarn build-js && yarn build-esm && yarn build-flow .",
39-
"build-js": "yarn tsc",
40-
"build-esm": "cross-env ESM=true yarn tsc --project tsconfig.esm.json && node ../../scripts/renameFileExtensions.js './esm/{**,!**/__tests__/}/*.js' . .esm.js",
41-
"build-clean": "rimraf {mode,hint,info,jump,lint}.{js,esm.js,js.flow,js.map,d.ts,d.ts.map} && rimraf esm results utils variables coverage cm6-legacy __tests__",
42-
"build-flow": "node ../../scripts/buildFlow.js",
43-
"watch": "babel --optional runtime resources/watch.js | node",
4438
"test": "jest",
45-
"postbuild": "node ../../scripts/renameFileExtensions.js './esm/{**,!**/__tests__/}/*.js' . .esm.js"
39+
"build": "node ../../scripts/renameFileExtensions.js './esm/{**,!**/__tests__/}/*.js' . .esm.js"
4640
},
4741
"peerDependencies": {
4842
"@codemirror/language": "6.0.0",

packages/graphiql-plugin-code-exporter/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
"types"
2525
],
2626
"scripts": {
27+
"prebuild": "rimraf dist types",
2728
"dev": "vite",
2829
"build": "tsc --emitDeclarationOnly && node resources/copy-types.mjs && vite build && UMD=true vite build",
2930
"preview": "vite preview"

packages/graphiql-plugin-explorer/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
"types"
2424
],
2525
"scripts": {
26+
"prebuild": "rimraf dist types",
2627
"dev": "vite",
2728
"build": "tsc --emitDeclarationOnly && node resources/copy-types.mjs && vite build && UMD=true vite build",
2829
"preview": "vite preview"

packages/graphiql-react/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@
3838
"types"
3939
],
4040
"scripts": {
41+
"prebuild": "rimraf dist types",
4142
"dev": "concurrently 'tsc --emitDeclarationOnly --watch' 'vite build --watch'",
4243
"build": "tsc --emitDeclarationOnly && vite build"
4344
},

0 commit comments

Comments
 (0)