voc
Generalized Literate Programming Framework
Last updated 5 years ago by sheetjs .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install voc -g
SYNC missed versions from official npm registry.

Very Ornate Code

So Literate Coffeescript 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):

<script src="https://raw.github.com/chjj/marked/master/lib/marked.js"></script>
<script src="http://coffeescript.org/extras/coffee-script.js"></script>

In tooling, npm install -g voc and run against your markdown file:

$ 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 for more information.

Dependencies Status NPM Downloads ghit.me Analytics

Current Tags

  • 1.2.0                                ...           latest (5 years ago)

5 Versions

  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.0                                ...           7 years ago
  • 0.5.0                                ...           10 years ago
  • 0.4.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (0)
None
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |