mjstahl / steal-lavascript

StealJS plugin for Literate JavaScript

Home Page:https://npm.im/steal-lavascript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

StealJS plugin for Literate JavaScript

Installation

$ npm install --save steal-lavascript

LavaScript is peer dependency and must be installed seperately.

$ npm install --save-dev lavascript

Use

To use this plugin load a js.md file with the bang syntax.

const otherFile = require('./otherFile.js.md!lavascript')
import otherFile from './otherFile.js.md!lavascript'

If you wanted to associate all .js.md files with the steal-lavascript plugin, you could specify it as a handler using the ext property in your steal configuration.

"steal": {
  "ext": {
    "js.md": "lavascript"
  }
}

With the above configuration, you can import a lavascript file as you would any other file.

const otherFile = require('./otherFile.js.md')
import otherFile from './otherFile.js.md'

Related

LavaScript - Literate Programming for JavaScript

About

StealJS plugin for Literate JavaScript

https://npm.im/steal-lavascript

License:MIT License


Languages

Language:JavaScript 100.0%