We use pnpm for this project. Install dependencies via:
pnpm install
pnpm run build
pnpm run test
pnpm run test:watch
Run the following:
cp ./packages/playground-example/.env.example ./packages/playground-example/.env
And then add a Sanity project ID.
Then, run pnpm run dev:playground
from the root to start up all the necessary dev servers. From there you can:
- edit the editor in
packages/playground-editor
; - edit the
groqd-playground
package frompackages/groqd-playground
; - test the integration in
packages/playground-example
.
We use changesets to create package versions and publish them.
Our official release path is to use automation to perform the actual publishing of our packages. The steps are to:
- A human developer adds a changeset. Ideally this is as a part of a PR that will have a version impact on a package.
- On merge of a PR our automation system opens a "Version Packages" PR.
- On merging the "Version Packages" PR, the automation system publishes the packages.
Here are more details:
When you would like to add a changeset (which creates a file indicating the type of change), in your branch/PR issue this command:
$ pnpm run changeset
to produce an interactive menu. Navigate the packages with arrow keys and hit <space>
to select 1+ packages. Hit <return>
when done. Select semver versions for packages and add appropriate messages. From there, you'll be prompted to enter a summary of the change. Some tips for this summary:
- Aim for a single line, 1+ sentences as appropriate.
- Include issue links in GH format (e.g.
#123
). - You don't need to reference the current pull request or whatnot, as that will be added later automatically.
After this, you'll see a new uncommitted file in .changesets
like:
$ git status
# ....
Untracked files:
(use "git add <file>..." to include in what will be committed)
.changeset/flimsy-pandas-marry.md
Review the file, make any necessary adjustments, and commit it to source. When we eventually do a package release, the changeset notes and version will be incorporated!
On a merge of a feature PR, the changesets GitHub action will open a new PR titled "Version Packages"
. This PR is automatically kept up to date with additional PRs with changesets. So, if you're not ready to publish yet, just keep merging feature PRs and then merge the version packages PR later.
We're using Docusaurus to for the scaffolding of our documentation. The docs source files live in docs
(so they can be viewed on GitHub), but the docusaurus site is built from website
. To run the docs locally, run the following.
pnpm run start:docs
To contribute to the docs, make changes within the docs
folder.