Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

voc

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

voc

Generalized Literate Programming Framework

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
121K
decreased by-8.59%
Maintainers
1
Weekly downloads
 
Created
Source

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

Keywords

FAQs

Package last updated on 27 Jul 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc