https://github.com/mjstahl/steal-lavascript
StealJS plugin for Literate JavaScript
https://github.com/mjstahl/steal-lavascript
javascript literate literate-programming loader stealjs
Last synced: 3 months ago
JSON representation
StealJS plugin for Literate JavaScript
- Host: GitHub
- URL: https://github.com/mjstahl/steal-lavascript
- Owner: mjstahl
- License: mit
- Created: 2019-04-19T15:32:03.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-07-22T13:58:44.000Z (almost 6 years ago)
- Last Synced: 2025-01-18T03:27:52.523Z (4 months ago)
- Topics: javascript, literate, literate-programming, loader, stealjs
- Language: JavaScript
- Homepage: https://npm.im/steal-lavascript
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# StealJS plugin for Literate JavaScript
## Installation
```console
$ npm install --save steal-lavascript
```[LavaScript](https://github.com/mjstahl/lavascript) is peer dependency and must be installed seperately.
```console
$ npm install --save-dev lavascript
```## Use
To use this plugin load a `js.md` file with the bang syntax.
```js
const otherFile = require('./otherFile.js.md!lavascript')
``````js
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.
```js
"steal": {
"ext": {
"js.md": "lavascript"
}
}
```With the above configuration, you can import a `lavascript` file as you would any other file.
```js
const otherFile = require('./otherFile.js.md')
``````js
import otherFile from './otherFile.js.md'
```## Related
[LavaScript](https://npm.im/lavascript) - Literate Programming for JavaScript