https://github.com/sheetjs/voc
:construction_worker: A Literate Programming Framework for JS and compile-to-JS languages.
https://github.com/sheetjs/voc
javascript language literate-programming preprocessor
Last synced: 2 months ago
JSON representation
:construction_worker: A Literate Programming Framework for JS and compile-to-JS languages.
- Host: GitHub
- URL: https://github.com/sheetjs/voc
- Owner: SheetJS
- License: apache-2.0
- Created: 2013-03-15T04:27:58.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2020-01-17T04:37:23.000Z (over 5 years ago)
- Last Synced: 2025-04-19T08:33:07.945Z (2 months ago)
- Topics: javascript, language, literate-programming, preprocessor
- Language: JavaScript
- Homepage: http://sheetjs.com
- Size: 40 KB
- Stars: 21
- Watchers: 6
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Very Ornate Code
So [Literate Coffeescript](http://coffeescript.org/#literate) is a cool idea,
but why isn't there a standard JS or compile-to-JS version? JS Programmers want
some love too! This is my effort to rectify this inequity.## How to use this
To use in-browser, include the marked source (and optionally the coffee-script
source if desired):```html
```
In tooling, `npm install -g voc` and run against your markdown file:
```bash
$ voc yourfile.md
```## VOC style
VOC searches for markdown code blocks. Using GFM guards (triple backticks),
hints after the opening backticks are used to direct content.For example, "\`\`\`>foo.bar" will redirect content in the codeblock to
`foo.bar`.## Preprocessing
If a preprocessor is available, VOC can be told to use it! This is needed for
certain magic cases like Makefiles (which require explicit tabs).VOC exposes two utility functions:
`VOC.run(src)` will process the specified string source.
`VOC.add(lang, cb)` will assign the handler for the language. If `lang` is an
array, the handler will be assigned for each language in the array.The language handlers will be called with one argument: the actual source to be
processed. Consecutive blocks with the same language are concatenated.See the enclosed [voc.md](voc.md) for more information.
[](https://david-dm.org/sheetjs/voc)
[](https://npmjs.org/package/voc)
[](https://ghit.me/repo/sheetjs/js-xlsx)
[](https://github.com/SheetJS/voc)