0.4.5 • Published 2 years ago

@offset-earth/certificates v0.4.5

Weekly downloads
347
License
MIT
Repository
-
Last release
2 years ago

Ecologi Certificate Generator

npm publish to publish the latest version. certificate

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
0.4.5

2 years ago

0.4.4

4 years ago

0.4.3

4 years ago

0.4.2

4 years ago

0.4.1

4 years ago

0.4.0

4 years ago

0.3.0

4 years ago

0.2.4

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago