-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
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.
f820af0
to
2cad926
Compare
@@ -0,0 +1,76 @@ | |||
import * as fs from 'node:fs'; | |||
import {CacheClient, CacheGetResponse, CacheSetResponse, Configurations, CredentialProvider} from '@gomomento/sdk'; | |||
|
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.