Registry / devops / honey-badger-cli

honey-badger-cli

JSON →
library0.0.3jsnpmunverified

HoneyBadger is a WIP ES2015+ to ES5 transpiler, bundler, and minifier written in Rust. This package provides a command-line interface and programmatic API (default export Badger class) for the Rust core. Version 0.0.3 wraps HoneyBadger 0.2.1. It is an experimental tool with limited ecosystem support, providing transform (transpile plus optional minify) and parse (AST) operations. No recent updates; likely abandoned.

npm install honey-badger-cli
INSTALL
IMPORT
SIG · HONEY-BADGER-CLI
H
honey-badger-cli
devopsjavascriptv0.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Badger
import Badger from 'honey-badger-cli'
const Badger = require('honey-badger-cli')
Package exports a default class. CommonJS require may work but ESM import is recommended.

Shows programmatic usage: create Badger instance, call transform with a string and minify=true, and CLI usage with --string.

import Badger from 'honey-badger-cli'; const instance = new Badger(); const code = 'const x = 1;'; const result = instance.badger.transform(code, true); console.log(result); // CLI usage: // $ honey-badger-cli --string "const x = 1;" --pretty
honey-badger --version
Debug
Known issues
gotchaPackage is a wrapper around a Rust binary via node-gyp. Native compilation may fail on unknown platforms.
fix
Ensure Rust toolchain and node-gyp prerequisites are installed. Consider using Docker.
affects: >=0.0.1
gotchaThe exported Badger class expects to be instantiated; calling Badger.process() without 'new' might throw.
fix
Always use `new Badger()` before calling methods.
affects: >=0.0.1
gotchaThe default export is a class, not a function. CommonJS users may mistakenly require as a function.
fix
Use `const Badger = require('honey-badger-cli').default` or use ES import.
affects: >=0.0.1
Errors
Common errors & fixes
Error: Cannot find module 'honey-badger-cli'
Package not installed or native module failed to build.
fix
Run `npm install honey-badger-cli` and ensure Rust/node-gyp dependencies installed.
TypeError: Badger is not a constructor
Using CommonJS require without .default to get the class.
fix
Use `const Badger = require('honey-badger-cli').default` or switch to ES import.
honey-badger-cli: command not found
Global install may have failed or PATH not set.
fix
Install globally with `npm install -g honey-badger-cli` or use npx.
Upgrade
Version history
0.0.3latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
honey-badger-cli — npm install honey-badger-cli · libregistry