Skip to content

Commit cda57b4

Browse files
committed
Add tokenizer comparison page and TOON format support
- Add docs/tokenizer.html for interactive format/token comparison - Add tokenizer.js for token counting and visualization - Add toon.js and toon-wrapper.js to support TOON format encoding/decoding - Update index.html navigation to include Token Comparison - Update GitHub workflow: rename to release.yml, add GitHub Release step, support provenance, Node.js 20, and tag triggers
1 parent b829b70 commit cda57b4

File tree

6 files changed

+2035
-6
lines changed

6 files changed

+2035
-6
lines changed
Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,29 @@
1-
name: Publish to NPM
1+
name: Release
22

33
on:
44
release:
55
types: [created]
6+
push:
7+
tags:
8+
- "v*"
9+
10+
permissions:
11+
id-token: write
12+
contents: write
613

714
jobs:
8-
build:
15+
publish:
916
runs-on: ubuntu-latest
1017
steps:
1118
- uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
1221

1322
- name: Setup Node.js
1423
uses: actions/setup-node@v4
1524
with:
16-
node-version: '18.x'
17-
registry-url: 'https://registry.npmjs.org'
25+
node-version: "20.x"
26+
registry-url: "https://registry.npmjs.org"
1827

1928
- name: Install dependencies
2029
run: |
@@ -31,9 +40,14 @@ jobs:
3140
cd nodejs-compressor
3241
npm test
3342
34-
- name: Publish to NPM
43+
- name: Publish to NPM with provenance
3544
run: |
3645
cd nodejs-compressor
37-
npm publish --access public
46+
npm publish --access public --provenance
3847
env:
3948
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
49+
50+
- name: Create GitHub Release
51+
run: npx changelogithub
52+
env:
53+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/index.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ <h1 class="text-xl font-semibold mb-1">
107107
<i data-lucide="bar-chart-2" class="w-4 h-4"></i>
108108
Benchmarks
109109
</a>
110+
<a
111+
href="tokenizer.html"
112+
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm border rounded-md hover:bg-gray-50 bg-blue-50 border-blue-200"
113+
>
114+
<i data-lucide="hash" class="w-4 h-4"></i>
115+
Token Comparison
116+
</a>
110117
<a
111118
href="tools.html"
112119
class="inline-flex items-center gap-1.5 px-3 py-1.5 text-sm border rounded-md hover:bg-gray-50"

0 commit comments

Comments
 (0)