prose
raw JSON → 0.0.1 verified Fri May 01 auth: no javascript abandoned
An experimental literate programming toolkit that reads markdown files and extracts code blocks to produce executable JavaScript programs. Current version 0.0.1 is a proof-of-concept released in 2013 with no further updates. It uses marked for markdown parsing and focuses on embedding code in markdown using shebang language declarations. Unlike other literate programming tools (e.g., Org-mode, Jupyter), prose is minimal and language-agnostic but limited to JavaScript/altJS compilation. It has no active maintenance or releases.
Common errors
error Error: Cannot find module 'marked' ↓
cause marked is listed as a dependency but not installed automatically; missing from package.json dependencies (only devDependencies).
fix
Run
npm install marked in your project. error ReferenceError: path is not defined ↓
cause The module uses `path` without requiring it (in `path.resolve`) when loading a module via CLI argument.
fix
Patch source to add
const path = require('path') at top. Warnings
deprecated Package is unmaintained since 2013; may have security vulnerabilities in marked dependency. ↓
fix Avoid using in production. Consider alternatives like literate-programming or org-mode.
gotcha Only JavaScript (via shebang) is actually supported despite claims of compiling any altJS language. ↓
fix Check source: no transpilation logic for other languages exists.
gotcha CLI usage: if arguments provided, it loads a module instead of transpiling stdin. This is undocumented. ↓
fix Run with no arguments to trigger stdin mode; otherwise provide a path to load a module.
Install
npm install prose yarn add prose pnpm add prose Imports
- main wrong
import main from 'prose'correctconst main = require('prose') - transpile
const { transpile } = require('prose')
Quickstart
const prose = require('prose');
const fs = require('fs');
// Create a simple markdown input with code blocks
const input = '# Hello\n\nThis is a sample program:\n\n #!/usr/bin/env javascript\n console.log("Hello, world!");\n\nThe end.';
const inputStream = fs.createReadStream(); // not practical; typical usage is stdin
// Instead, run as CLI:
// echo -e '# Example\n\n #!/usr/bin/env javascript\n console.log("Hello");' | node prose
// Or capture output via shell.
console.log('See CLI usage.');