@offset-earth/certificates
v0.4.5
Published
`npm publish` to publish the latest version. ![certificate](./__tests__/fixtures/certificate.png)
Downloads
543
Keywords
Readme
Ecologi Certificate Generator
npm publish
to publish the latest version.
Create local gift certificate
If you need to re-create a gift cert for support reasons etc you can uncomment the fs.writeFile
line and the generateGiftCard
line at the bottom of the src/gift.ts
file.
Add the couponCode
you want to the options object and then run yarn make-local-cert
! The gift.pdf
file should appear in the root dir.
API
Using a Buffer:
function generateCertificate( content: { name: string; totalTons: number; projects: { name: string; tons: number }[]; startDate: Date; endDate: Date; issuedAt: Date; id: string; }, ): Promise<Buffer>;
Using a Stream:
function generateCertificate( content: { name: string; totalTons: number; projects: { name: string; tons: number }[]; startDate: Date; endDate: Date; issuedAt: Date; id: string; }, outputStream: NodeJS.WritableStream, ): void;
Publishing a new version
- Update the version in package.json
npm publish