Skip to content

Commit 2834e5c

Browse files
committed
Initial commit
0 parents  commit 2834e5c

33 files changed

+3925
-0
lines changed

.github/funding.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
github: paulmillr
2+
# custom: https://paulmillr.com/funding/

.github/workflows/nodejs.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Node CI
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test:
7+
name: v${{ matrix.node }} @ ubuntu-latest
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node:
12+
- 18
13+
- 20
14+
steps:
15+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
16+
- name: Use Node.js ${{ matrix.node }}
17+
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
18+
with:
19+
node-version: ${{ matrix.node }}
20+
- run: npm install
21+
- run: npm run build --if-present
22+
- run: npm test
23+
- run: npm run lint --if-present

.github/workflows/publish-npm.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish Package to npm
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: read
10+
id-token: write
11+
steps:
12+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
13+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
14+
with:
15+
node-version: 20
16+
registry-url: 'https://registry.npmjs.org'
17+
cache: npm
18+
- run: npm install -g npm
19+
- run: npm ci
20+
- run: npm run build
21+
- run: npm publish --provenance --access public
22+
env:
23+
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}

.github/workflows/upload-release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Upload standalone file to GitHub Releases
2+
on:
3+
release:
4+
types: [created]
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
permissions:
9+
contents: write
10+
id-token: write
11+
steps:
12+
- uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4
13+
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # v4
14+
with:
15+
node-version: 20
16+
registry-url: 'https://registry.npmjs.org'
17+
cache: npm
18+
- run: |
19+
npm install -g npm
20+
npm ci
21+
npm run build
22+
cd build
23+
npm ci
24+
npm run build
25+
gh release upload ${{ github.event.release.tag_name }} noble-hashes.js
26+
env:
27+
GH_TOKEN: ${{ github.token }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
node_modules
2+
/*.js
3+
/esm/*.js
4+
*.d.ts
5+
*.d.ts.map
6+
*.js.map
7+
/build

.prettierrc.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"printWidth": 100,
3+
"singleQuote": true,
4+
"trailingComma": "es5"
5+
}

.vscode/settings.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"files.exclude": {
3+
"*.{js,d.ts,js.map,d.ts.map}": true,
4+
"esm/*.{js,d.ts,js.map,d.ts.map}": true
5+
}
6+
}

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2024 Paul Miller (https://paulmillr.com)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the “Software”), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)