VlaamsCodex
raw JSON → 0.2.5 verified Fri May 01 auth: no javascript
Platskript transpiler toolchain (v0.2.5) that compiles Flemish dialect keyword code to Python. Active development with monthly releases. Key differentiator: supports 7 Flemish dialects for commands and error messages. Distributed as a Python package via PyPI, with a thin npm wrapper for Node.js (>=18) users. Includes interactive REPL, project scaffolding, syntax checking, and a browser playground via Pyodide.
Common errors
error Error: Python not found. Install Python 3.10 or higher and ensure it is in your PATH. ↓
cause The npm wrapper spawns a Python child process but cannot locate the Python executable.
fix
Install Python 3.10+ from python.org and add to PATH, or use the browser playground.
error SyntaxError: Expected 'maak funksie' but found 'maak functie' on line 1 ↓
cause Typo in keyword: 'functie' instead of 'funktie' or 'funksie' depending on dialect.
fix
Use correct spelling: 'maak funksie' for function definition. Check dialect mappings.
error TypeError: compiler.runString is not a function ↓
cause Using an older version of the npm package (<0.2.0) that did not expose runString.
fix
Upgrade to >=0.2.0 or use compiler.transpile() instead.
Warnings
breaking The npm wrapper vlaamscodex has limited support compared to the Python package; many features (e.g., multi-dialect CLI commands) are only available in Python. ↓
fix Install the Python package via pip for full CLI functionality: pip install vlaamscodex
gotcha The package uses a Python runtime under the hood (via child process or Pyodide). Ensure Python 3.10+ is installed when using Node.js wrapper without browser playground. ↓
fix Install Python 3.10+ and add to PATH, or use the browser playground via Pyodide.
deprecated Calling the CLI via 'plats voertuut' (West-Vlaams) or other dialect aliases is not available in the npm wrapper; use the standard 'plats run' command. ↓
fix Use English command 'plats run' or install the Python package.
gotcha The package version in npm may lag behind PyPI. Check for latest Python release for new features. ↓
fix Monitor PyPI for updates; the npm wrapper is a thin mirror.
breaking From v0.2.0, the package changed from a mono-dialect to multi-dialect, breaking scripts that relied on old dialect-specific syntax. ↓
fix Update Platskript source to use new keyword mappings or check release notes for dialect changes.
gotcha The 'plats fortune' and other easter egg commands may not work in the npm wrapper if Python is not available. ↓
fix Ensure Python 3.10+ is installed and accessible.
Install
npm install vlaamscodex yarn add vlaamscodex pnpm add vlaamscodex Imports
- PlatsCompiler wrong
const PlatsCompiler = require('vlaamscodex')correctimport { PlatsCompiler } from 'vlaamscodex' - plats wrong
const plats = require('vlaamscodex')correctimport plats from 'vlaamscodex' - runPlatsScript wrong
import { runPlatsScript } from 'vlaamscodex'correctimport { runPlatsScript } from 'vlaamscodex/utils'
Quickstart
// Initialize and run a Platskript program programmatically
import { PlatsCompiler } from 'vlaamscodex';
const compiler = new PlatsCompiler();
const platsCode = `
maak funksie groet(d) doe
klap "gdag " + d
doen
groet("Alix")
`;
const output = await compiler.runString(platsCode);
console.log(output); // Expected: "gdag Alix"
// Or run a file:
// await compiler.runFile('hello.plats');