Skip to content

Commit

Permalink
Use jsbt for tsconfig and building
Browse files Browse the repository at this point in the history
  • Loading branch information
paulmillr committed Mar 17, 2024
1 parent 2834e5c commit 746fd54
Show file tree
Hide file tree
Showing 13 changed files with 603 additions and 37 deletions.
1 change: 0 additions & 1 deletion .github/funding.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
github: paulmillr
# custom: https://paulmillr.com/funding/
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node CI
name: Run node.js tests
on:
- push
- pull_request
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Package to npm
name: Publish package to npm
on:
release:
types: [created]
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/upload-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ jobs:
node-version: 20
registry-url: 'https://registry.npmjs.org'
cache: npm
- run: npm install -g npm
- run: npm ci
- run: npm run build
- run: |
npm install -g npm
npm ci
npm run build
cd build
npm ci
npm run build
gh release upload ${{ github.event.release.tag_name }} noble-hashes.js
npm run build:release
cd ..
- run: gh release upload ${{ github.event.release.tag_name }} build/`npx jsbt outfile`
env:
GH_TOKEN: ${{ github.token }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ node_modules
*.d.ts
*.d.ts.map
*.js.map
/build
/build/noble-post-quantum.js
7 changes: 7 additions & 0 deletions build/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# build

The directory is used to build a single file which contains everything.

The single file uses iife wrapper and can be used in browsers as-is.

Don't use it unless you can't use NPM/ESM, which support tree shaking.
11 changes: 11 additions & 0 deletions build/input.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export { ml_kem512, ml_kem768, ml_kem1024 } from '@noble/post-quantum/ml-kem';
export { kyber512, kyber768, kyber1024 } from '@noble/post-quantum/ml-kem';
export { ml_dsa44, ml_dsa65, ml_dsa87 } from '@noble/post-quantum/ml-dsa';
export {
slh_dsa_sha2_128f,
slh_dsa_sha2_128s,
slh_dsa_sha2_192f,
slh_dsa_sha2_192s,
slh_dsa_sha2_256f,
slh_dsa_sha2_256s,
} from '@noble/post-quantum/slh-dsa';
Loading

0 comments on commit 746fd54

Please sign in to comment.