examples & `build-demo`
- Dominant language
- TypeScript
- Stars
- 16.9k
- Forks
- 1.9k
- Avg merge
- 22h 45m
- Merged PRs (30d)
- 70
Description
Recently in #2922 we tried enabling `eslint` for examples again, and it caused many issues. Perhaps we can specify a few more important examples as we do in the workspaces config, which are examples intended for things such as `monaco-graphql` development.
We used to build a few examples on `build-demo` script in netlify to validate webpack, parcel, etc other bundlers (incl. type checking in the case of webpack) were working with the npm module, and then a script that ran after to copy the build output to a path in the netlify publishing directory. Eventually we just created a separate netlify deploy for the monaco example but I think we disabled that, and that was using a
The graphiql example is also internal to the workspace - should that just use an example as well?
Or should we move examples into each workspace?
So for example
- `examples/graphiql-typescript-webpack`
- `examples/graphiql-parcel`
- `examples/graphiql-cdn`
- `examples/graphiql-create-react-app`
becomes
- `packages/graphiql/examples/cdn`
- `packages/graphiql/examples/create-react-app`
- `packages/graphiql/examples/typescript-webpack5`
- `packages/graphiql/examples/webpack5`
- `packages/graphiql/examples/parcel`
- `packages/graphiql/examples/vite`
- `packages/graphiql/examples/vite-typescript`
some I'd like to add
- `packages/graphiql/examples/nextjs`
etc
also would be cool to have links to codesandbox/stackblitzes of these examples in the docs
What is the purpose of `build-docs` and `build-demo` then?
What are the goals of this side of the tooling?
It's possible that we could switch `build-docs`, which uses typedoc to generate markdown, to run as a pre-commit task, and to check for a diff in CI to ensure the typedocgen commit has been run. or it can be an after-effect workflow on merge.
Contributor guide
Assessment
This issue has not been assessed yet.