f2js-cli
raw JSON → 0.0.4 verified Fri May 01 auth: no javascript
Command-line interface for the Forth-to-JavaScript transpiler (f2js). Stable version 0.0.4. Minimal activity; likely experimental or personal. Converts Forth code into JavaScript for execution in Node.js or the browser. Differentiated by targeting JavaScript as a backend for Forth.
Common errors
error Error: Cannot find module 'f2js-cli' ↓
cause Attempting to require() a CLI package that is meant to be run globally.
fix
Use as command: f2js [options] <file>
Warnings
deprecated Package version 0.0.4 is very early; no releases since initial publish. ↓
fix Evaluate if project is maintained before relying on it.
gotcha The CLI may not support all Forth standards; test thoroughly. ↓
fix Check documentation or source for supported features.
Install
npm install f2js-cli yarn add f2js-cli pnpm add f2js-cli Imports
- default wrong
const f2js = require('f2js-cli')correctnpm install -g f2js-cli
Quickstart
npm install -g f2js-cli
cat > hello.fth << 'EOF'
: hello ." Hello, Forth!" ;
hello
EOF
f2js hello.fth