mirror of
https://github.com/hanzoai/insights-js.git
synced 2026-10-30 18:34:19 +00:00
One family. Font stacks name Zen and fall back to the native faces, tokens name the role rather than a face, and the packages that used to supply a face now point at @hanzo/font. Self-hosted @font-face blocks are removed rather than renamed: rewriting the family in one would leave a src pointing at a file this repo no longer ships. @hanzo/font carries the binaries and declares the faces, so the local copies go with the declaration that used them. Comments naming a face we no longer use are deleted, not reworded.
Getting started
Requirements
# Install Insights CLI globally
cargo install insights-cli
From the project root directory:
# Install deps
pnpm install
# Build local version of @hanzo/insights
pnpm run build-insights
Sourcemaps management
Commands to test sourcemap upload:
# Generate build artifacts and use insights-cli to inject snippets into sources and sourcemaps
VITE_INSIGHTS_KEY='<your-project-key>' VITE_INSIGHTS_HOST='http://localhost:8010' pnpm run build
# For NextJS based app use
NEXT_PUBLIC_INSIGHTS_KEY='<your-project-key>' NEXT_PUBLIC_INSIGHTS_HOST='http://localhost:8010' pnpm run build
# Use insights-cli to inject snippets into sources and sourcemaps
pnpm run inject
# Upload sourcemaps to Insights
pnpm run upload
# Run application locally with newly generated minified build and sourcemaps
# Start sending exceptions to Insights
pnpm run preview