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

chore: adding examples that are currently hard-coded in dev docs #1428

Merged
merged 7 commits into from
Sep 4, 2024

Conversation

cprice404
Copy link
Contributor

This commit copies over a lot of example JS code that is currently
hard-coded in the dev docs, into example files here that we can
validate in CI. Also hopefully makes it easier to make sweeping
changes in the future (such as our instanceof migration).

A subsequent dev docs PR will consume these and get rid of the
hard-coded examples.

@cprice404 cprice404 requested a review from a team August 28, 2024 22:22
This commit copies over a lot of example JS code that is currently
hard-coded in the dev docs, into example files here that we can
validate in CI. Also hopefully makes it easier to make sweeping
changes in the future (such as our instanceof migration).

A subsequent dev docs PR will consume these and get rid of the
hard-coded examples.
@cprice404 cprice404 force-pushed the move-example-snippets-from-dev-docs branch from f820af0 to 2cad926 Compare September 4, 2024 21:03
@@ -0,0 +1,76 @@
import * as fs from 'node:fs';
import {CacheClient, CacheGetResponse, CacheSetResponse, Configurations, CredentialProvider} from '@gomomento/sdk';

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we going to commit this file? Otherwise main just bails without error.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? sorry i'm not following your question

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh you're asking about the json file. hrm let me look

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this example is really for the docs site, but i can add that file.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops. Yes I meant the json file. As is we can syntax check but if we run the program, without the file, the run function will return fast.

@cprice404 cprice404 merged commit 8f949a0 into main Sep 4, 2024
13 checks passed
@cprice404 cprice404 deleted the move-example-snippets-from-dev-docs branch September 4, 2024 23:13
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

Successfully merging this pull request may close these issues.

2 participants