Skip to content

Commit fbdcaea

Browse files
authored
ci: force build (#1476)
* force build for publish * more windows compatible contributor DX * add some docs and root scripts
1 parent 00cb4fe commit fbdcaea

File tree

5 files changed

+30
-15
lines changed

5 files changed

+30
-15
lines changed

DEVELOPMENT.md

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,18 @@
2424
yarn run build
2525
```
2626

27+
you can also use
28+
29+
```sh
30+
yarn run watch
31+
```
32+
33+
if you are focused on GraphiQL development, you can run
34+
35+
```sh
36+
yarn run start-graphiql
37+
```
38+
2739
5. Get coding! If you've added code, add tests. If you've changed APIs, update
2840
any relevant documentation or tests. Ensure your work is committed within a
2941
feature branch.
@@ -54,10 +66,12 @@ to run tests for GraphiQL:
5466

5567
1. `yarn` - install and link all packages
5668
2. `yarn build` - cleans first, then builds everything but webpack bundles - `tsc --build`, `babel` etc
57-
3. `yarn build-bundles` - builds webpack bundles that are used for releases
58-
4. `yarn build-demo` - builds demo projects for netlify; we run this on CI to make sure webpack can consume our project in a standalone project.
59-
5. `yarn test` - runs `jest`. so `yarn t --watch`
60-
6. `yarn format` - autoformats with eslint --fix and prettier
61-
7. `yarn lint` - checks for linting issues
62-
8. `yarn e2e` - runs cypress headlessly against the minified bundle and a local schema server, like in CI.
63-
9. `yarn jest` - runs global jest commands across the entire monorepo; try `yarn test --watch` or `yarn jtest DocExplorer` for example :D
69+
3. `yarn build-ts` - builds typescript using `--build` and `--force` flag.
70+
4. `yarn watch` - runs `tsc --build --watch`, for when you make cross-repository changes
71+
5. `yarn build-bundles` - builds webpack bundles that are used for releases
72+
6. `yarn build-demo` - builds demo projects for netlify; we run this on CI to make sure webpack can consume our project in a standalone project.
73+
7. `yarn test` - runs `jest`. so `yarn t --watch`
74+
8. `yarn format` - autoformats with eslint --fix and prettier
75+
9. `yarn lint` - checks for linting issues
76+
10. `yarn e2e` - runs cypress headlessly against the minified bundle and a local schema server, like in CI.
77+
11. `yarn jest` - runs global jest commands across the entire monorepo; try `yarn test --watch` or `yarn jtest DocExplorer` for example :D

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"build": "yarn run build-clean && yarn build-ts && yarn build-babel",
2525
"build-babel": "yarn workspace codemirror-graphql run build",
26-
"build-ts": "yarn run tsc",
26+
"build-ts": "yarn run tsc --force",
2727
"build-ts-cjs": "yarn run tsc resources/tsconfig.build.cjs.json",
2828
"build-ts-esm": "yarn run tsc resources/tsconfig.build.esm.json",
2929
"build-clean": "lerna run build-clean",
@@ -53,7 +53,8 @@
5353
"pretty-check": "node resources/pretty.js --check",
5454
"format": "yarn eslint --fix && yarn pretty",
5555
"lerna-publish": "lerna publish",
56-
"prepublish": "./resources/prepublish.sh"
56+
"watch": "yarn tsc --watch",
57+
"start-graphiql": "yarn workspace graphiql dev"
5758
},
5859
"devDependencies": {
5960
"@babel/cli": "^7.8.4",

packages/graphiql/tsconfig.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"baseUrl": ".",
99
"strictPropertyInitialization": false,
1010
"types": ["node", "jest"],
11-
"typeRoots": ["../../node_modules/@types", "node_modules/@types"],
1211
"lib": ["dom"]
1312
},
1413
"include": ["src"],

resources/README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,11 @@ For each `.js` file under `src`, creates a corresponding `.js.flow` file under `
1010

1111
Compiles `.js` files under `src` using Babel, writing the output to `dist`. This script is invoked via `yarn run build-js` (and also `yarn run build`).
1212

13-
### `prepublish.js`
14-
15-
This script is invoked via `yarn run prepublish`.
16-
1713
### `pretty.js`
1814

1915
Prettifies the code base, or tests that it is already prettified. This script is invoked for these two purposes respectively via `yarn run pretty` and `yarn run pretty-check` (and also `npm test`).
16+
17+
## Typescript Configs
18+
19+
`.build.*` - used for project references
20+
`.base.*` - used for extends for downstream tsconfigs

yarn.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@
436436
"@babel/helper-remap-async-to-generator" "^7.8.3"
437437
"@babel/plugin-syntax-async-generators" "^7.8.0"
438438

439-
"@babel/plugin-proposal-class-properties@^7.7.0", "@babel/plugin-proposal-class-properties@^7.8.3", "@babel/plugin-proposal-class-properties@^7.8.34":
439+
"@babel/plugin-proposal-class-properties@^7.7.0", "@babel/plugin-proposal-class-properties@^7.8.3":
440440
version "7.8.3"
441441
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.8.3.tgz#5e06654af5cd04b608915aada9b2a6788004464e"
442442
integrity sha512-EqFhbo7IosdgPgZggHaNObkmO1kNUe3slaKu54d5OWvy+p9QIKOzK1GAEpAIsZtWVtPXUHSMcT4smvDrCfY4AA==

0 commit comments

Comments
 (0)