Registry / web-framework / bitbox-transpiler

bitbox-transpiler

JSON →
library1.0.25jsnpmunverified

Transform bitbox syntax to JavaScript. Version 1.0.25 is the current stable release. This package is part of the bitboxjs ecosystem and provides a transpiler that converts bitbox template syntax (similar to JSX) into standard JavaScript. It is used to compile .bitbox files into runnable JavaScript code. The library is designed for use with bitbox applications and is typically a build-time dependency. It has no active development cadence and is niche to the bitbox framework.

npm install bitbox-transpiler
INSTALL
IMPORT
SIG · BITBOX-TRANSPILER
B
bitbox-transpiler
web-frameworkjavascriptv1.0.25
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.

default
import transpile from 'bitbox-transpiler'
const transpile = require('bitbox-transpiler')
The default export is the transpile function. ESM preferred; CJS may work but not guaranteed.
transpile
import { transpile } from 'bitbox-transpiler'
import transpile from 'bitbox-transpiler'
Named export available; but default import is also supported. Check module definition.
TransformOptions
import type { TransformOptions } from 'bitbox-transpiler'
TypeScript users: import the type for transform options. Not available in CJS.

Transpile bitbox syntax to JavaScript using the default import and basic usage.

import transpile from 'bitbox-transpiler'; const code = '<div>Hello World</div>'; const result = transpile(code); console.log(result); // => 'React.createElement("div", null, "Hello World")'
bitbox --version
Debug
Known issues
gotchaThe package might not work with Node.js versions below 12 due to use of modern JavaScript features.
fix
Upgrade Node.js to version 12 or higher.
affects: >=1.0.0
gotchaNo TypeScript definitions included; need to install @types/bitbox-transpiler separately.
fix
Run 'npm install --save-dev @types/bitbox-transpiler' if using TypeScript.
affects: >=1.0.0
deprecatedThe API may change in future versions; no guarantees on breaking changes.
fix
Pin specific version and test upgrades carefully.
affects: <2.0.0
Errors
Common errors & fixes
Cannot find module 'bitbox-transpiler'
Package not installed or not in node_modules.
fix
Run 'npm install bitbox-transpiler' to install it.
SyntaxError: Unexpected token '<'
Code passed to transpile is not valid bitbox syntax.
fix
Ensure input is valid bitbox markup, e.g., '<div>...</div>'.
'import' and 'export' may only appear at the top level
Using transpile on code that contains import/export statements outside of module scope.
fix
Ensure the input code is a full module or use appropriate transformer options.
Upgrade
Version history
1.0.25latest on npm
Audit
Dependencies

No dependency data recorded yet.

Agent activity
8 hits · last 30 days
node
6
Amazon
1
OpenAI (training)
1
Resources
bitbox-transpiler — npm install bitbox-transpiler · libregistry