Registry / devops / snipbuild

snipbuild

JSON →
library0.3.1jsnpmunverified

snipbuild is a build tool for bundling HyperSnips snippets with TypeScript support for global blocks. Current stable version is 0.3.1. It uses Rolldown under the hood to bundle TypeScript globals into snippets, supports splitting code across files, and enables use of standard JS/TS tooling like Vitest for testing. Unlike manual snippet writing, snipbuild allows maintaining complex snippet collections with shared common snippets via #include and proper TypeScript compilation. The tool is actively maintained with recent updates on npm.

npm install snipbuild
INSTALL
IMPORT
SIG · SNIPBUILD
S
snipbuild
devopsjavascriptv0.3.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Install and run snipbuild to generate bundled HyperSnips snippets from source files, then link output to editors.

# install and run npx snipbuild # Or install as dev dependency npm install -D snipbuild # pnpm add -D snipbuild # Add script to package.json "scripts": { "build": "snipbuild" } # Run build npm run build # Generated snippets are in dist/ # Link them for HyperSnips (macOS example) for app in Code Cursor; do dir="$HOME/Library/Application Support/$app/User/globalStorage/draivin.hsnips" mkdir -p "$dir" ln -sf $(realpath dist) "$dir/hsnips" done
Debug
Known issues
gotchaGlobal JavaScript files must use named exports only; export default is not allowed.
fix
Use `export function` or `export const` instead of `export default`.
affects: *
gotchaSnippet files must not contain a global block; place globals in separate TypeScript files.
fix
Remove 'global...endglobal' from .hsnips snippet blocks; define globals in src/globals/[LANGUAGE].ts.
affects: *
gotchaSymbolic link on Windows may require admin privileges or different approach.
fix
Use mklink /D on Windows or copy files manually.
affects: *
Errors
Common errors & fixes
Error: You can't use export default in globals. Only named exports are allowed.
Using default export in a global TypeScript file.
fix
Change to named exports: export function myHelper() { ... }
Error: Cannot find module 'snipbuild'
snipbuild not installed or not in PATH.
fix
Run npm install -D snipbuild and use npx snipbuild or add to package.json scripts.
Upgrade
Version history
0.3.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
snipbuild — npm install snipbuild · libregistry