Skip to content

examples & build-demo #2945

Open
Open
@acao

Description

@acao

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions