danwallach / ElectionGuard-TypeScript

TypeScript implementation of ElectionGuard (subset for ballot encryption)
MIT License
8 stars 0 forks source link

Prepare for packaging #5

Closed shreyasminocha closed 2 years ago

shreyasminocha commented 2 years ago

Fixes build errors and package metadata. I confirmed that importing API functions works.

yarn link
mkdir pkg-test
cd pkg-test
touch index.mjs
yarn link electionguard

All of these work and are equivalent:

import { encryptBallot_ballotOut } from 'electionguard';
console.log(encryptBallot_ballotOut);
import eg from 'electionguard';
console.log(eg.encryptBallot_ballotOut);
const eg = require('electionguard');
console.log(eg.encryptBallot_ballotOut);