-
Notifications
You must be signed in to change notification settings - Fork 9
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
fix: Update readme examples #87
Conversation
|
// define a location where to place the signed asset | ||
const outputPath = resolve('signed.jpg'); | ||
|
||
// create a signing function | ||
async function sign(asset, manifest) { |
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.
asset/output path moved out since they'll be passed in as params to the sign function
// asset mimetype must match the asset type ebing read | ||
const asset: Asset = { buffer, mimeType: 'image/jpeg' }; | ||
|
||
// create a signing function | ||
async function sign(asset, manifest) { |
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.
asset/buffer moved out since they'll be passed in as params to the sign function
{ vendor: 'cai' }, | ||
); | ||
|
||
// create a signing function | ||
async function sign(asset, manifest) { |
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.
asset/buffer moved out since they'll be passed in as params to the sign function
@@ -275,7 +312,37 @@ async function sign(asset, manifest) { | |||
}); | |||
} | |||
|
|||
sign(asset, manifest); | |||
// build a manifest to use for signing | |||
const manifest = new ManifestBuilder( |
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.
A bit repetitive, but it makes the examples copy-pastable to have the manifest buildet here too
@@ -317,7 +389,37 @@ async function sign(asset, manifest) { | |||
}); | |||
} | |||
|
|||
sign(asset, manifest); | |||
// build a manifest to use for signing | |||
const manifest = new ManifestBuilder( |
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.
A bit repetitive, but it makes the examples copy-pastable to have the manifest buildet here too
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.
One small punctuation correction, otherwise LGTM.
Follow-up of #86
Update readme examples