VOC (Very Ornate Code) is a generalized literate programming framework for JavaScript and compile-to-JS languages. It processes Markdown files, extracting code blocks delimited by triple backticks and directing them to specified output files based on hints after the opening backticks. Version 1.2.0 is stable but sees infrequent updates; it supports Node.js >=0.8 and browser usage. Unlike more modern literate programming tools, VOC focuses on simplicity and integration with existing Markdown workflows, offering a preprocessor API for custom language handlers.
npm install vocVerified import paths — ran on the pinned version, not inferred.
Shows how to use VOC programmatically to process a Markdown file with code blocks.
Include the required scripts before using VOC in a browser.
Avoid using VOC with multiple concurrent scripts; consider using separate scopes or a wrapper function.
Upgrade to >=1.0.0 and use `VOC.run()`.
Ensure unique output paths per code block to avoid unintended overwrites.
For modern environments, consider using a newer literate programming tool that supports ESM and async/await.
Ensure you have loaded VOC properly: use `const { VOC } = require('voc');` in Node or include the script tag in browser.Add `<script src="path/to/voc.js"></script>` before using VOC.
Run `npm install voc` in your project directory.
Use `const { VOC } = require('voc');` instead of `import`.No dependency data recorded yet.