Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure README example is living code #453

Closed
mixmix opened this issue Jan 12, 2025 · 3 comments
Closed

Ensure README example is living code #453

mixmix opened this issue Jan 12, 2025 · 3 comments

Comments

@mixmix
Copy link
Collaborator

mixmix commented Jan 12, 2025

@frankiebee added a cool thing where the baseExample in the README is used in a test.

I think we can and should take this a step further by adding a script which automates this so that we never get out of sync.
Idea:

  • wrap README code block in: <!-- { copyToFile: "tests/README.test.ts", blockName: 'basicExample' } -->
  • have a similar block in test // { copyFromFile: "README.md", blockName: 'basicExample }
  • write a script which always runs in tests which copies that block from README.md to tests/README/test.ts

#nicetohave / #sidequest

@frankiebee
Copy link
Collaborator

frankiebee commented Jan 13, 2025

this is already done in a way here: https://github.com/entropyxyz/sdk/blob/main/tests/README.test.ts#L95

@frankiebee
Copy link
Collaborator

is that sufficient to close this issue?

@frankiebee
Copy link
Collaborator

got a verbal confirmation from @mixmix to close this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants