Wort
raw JSON → 0.1.8 verified Fri May 01 auth: no javascript maintenance
Wort is a simple concatenative programming language that compiles to JavaScript. Version 0.1.8 is the latest stable release. The project appears to be in early development with infrequent updates. It provides a command-line tool to transpile .wort files into Node.js modules. Unlike other concatenative languages like Forth, Wort targets JavaScript runtime, making it accessible for web development. Its key differentiator is its minimalistic syntax and ease of integration with JavaScript via transpilation.
Common errors
error wort: command not found ↓
cause Not installed globally or not in PATH.
fix
Install globally: npm install -g wort, or use npx wort.
error SyntaxError: Unexpected token ↓
cause Wort syntax error in source file.
fix
Check wort syntax: statements end with semicolon, definitions use colon.
Warnings
deprecated The CLI uses global install; npm recommends npx. ↓
fix Use npx wort instead of global install.
gotcha Output file extension is .wort.js; ensure your loader understands it. ↓
fix Use explicit .js extension or rename.
gotcha Browserify is suggested but not officially tested. ↓
fix Test thoroughly when targeting browsers.
Install
npm install wort yarn add wort pnpm add wort Imports
- wort wrong
const wort = require('wort')correctimport wort from 'wort' - compile wrong
const { compile } = require('wort')correctimport { compile } from 'wort' - File wrong
require('wort').Filecorrectimport { File } from 'wort'
Quickstart
// Install globally or locally
npm install wort
// Create a file 'helloworld.wort'
echo 'main: "Hello, World!" printz ;' > helloworld.wort
// Transpile
wort helloworld.wort
// Run the output
node helloworld.wort.js
// Expected output: Hello, World!