Files
carrotpilot/tinygrad_repo/examples/tinychat/tinychat-browser/make_tiktoken_js.sh
Vehicle Researcher bd2ed6664a Carrot2-v9
2025-08-03 19:15:56 +09:00

11 lines
370 B
Bash

#!/usr/bin/env bash
cd "$(dirname "$0")"
npm init -y && \
npm install --save-dev webpack webpack-cli && \
npm install tiktoken && \
jq '.scripts.build = "webpack"' package.json > package.tmp.json && \
mv package.tmp.json package.json && \
npm run build && \
mv dist/*.wasm ./tiktoken_bg.wasm && \
mv dist/* ./ && \
rm -rf dist node_modules package-lock.json package.json