Registry / web-framework / ratel
library1.0.1jsnpmunverified

HoneyBadger CLI is a command-line interface and programmatic API for HoneyBadger, a Rust-based ES2015+ to ES5 transpiler, bundler, and minifier. Version 1.0.1 provides both a CLI with version, help, file/string input, output, minification toggle, and AST printing options, as well as a JavaScript API via the default export Badger class with methods like getVersion(), getUsage(), process(options), and access to a native rust module with transform() and parse(). This package is experimental and not suitable for production; it uses native Rust bindings and has infrequent updates (last release 1.0.1, previous 0.0.3). Key differentiator: Rust performance for transpilation vs Babel or esbuild, but very early stage and limited features.

npm install ratel
INSTALL
IMPORT
SIG · RATEL
R
ratel
web-frameworkjavascriptv1.0.1
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'
import { Badger } from 'honey-badger-cli'
The package exports a default class Badger, not a named export. Named import will be undefined.
instance.badger.transform
import Badger from 'honey-badger-cli'; const instance = new Badger(); instance.badger.transform(string, minify)
import { transform } from 'honey-badger-cli'
The transform method is accessed via the badger property of an instance, not directly imported.
instance.process
import Badger from 'honey-badger-cli'; const instance = new Badger(); instance.process({ file: './input.js' })
const result = process({ file: './input.js' })
process is an instance method, not a standalone function.

Shows how to import the default Badger class, create an instance, use getVersion, process a string with pretty formatting, and use the native transform method to minify.

import Badger from 'honey-badger-cli'; const instance = new Badger(); console.log(instance.getVersion()); const result = instance.process({ string: 'const x = () => 1;', pretty: true }); console.log(result); const minified = instance.badger.transform('const x = () => 1;', true); console.log(minified);
hbcl --version
Debug
Known issues
breakingImporting the package as a named import yields undefined.
fix
Use default import: import Badger from 'honey-badger-cli'
affects: >=0.0.2
gotchaThe badger property is only available after instantiation and requires native Rust bindings to compile.
fix
Ensure the native module is built properly; if not, instance.badger may be undefined.
affects: >=0.0.2
gotchaThe package is experimental and relies on the HoneyBadger Rust project, which may not be actively maintained.
fix
Consider using Babel, swc, or esbuild for production use.
affects: >=0.0.0
deprecatedThe --ast output format and process options are not guaranteed to be stable across versions.
fix
Do not rely on AST output for production code.
affects: >=0.0.0
Errors
Common errors & fixes
Cannot find module 'honey-badger-cli'
The package may not be installed or the module resolution path is incorrect.
fix
Run 'npm install honey-badger-cli' and ensure you are using the correct import path.
TypeError: (0 , _honeyBadgerCli.default) is not a constructor
Using a named import instead of default import.
fix
Change to: import Badger from 'honey-badger-cli'
Error: No input provided.
The process() method requires either 'file' or 'string' option.
fix
Pass either { file: 'path' } or { string: 'code' } to process().
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies

No dependency data recorded yet.

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