Socket
Socket
Sign inDemoInstall

gulp-ljs

Package Overview
Dependencies
98
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gulp-ljs

Literate Javascript Gulp plugin.


Version published
Weekly downloads
3
decreased by-57.14%
Maintainers
1
Install size
2.88 MB
Created
Weekly downloads
 

Readme

Source

gulp-ljs

This is a gulp plugin for ljs - Literate Javascript. Note, that there are two ways of literating your code:

  • .lit.js -> .md and .lit.js -> .js (see literate)
  • .js -> .md *THIS*

Everything inside /* and */ is handled as markup. Your code will be transformed into the markup code environment. Just to give you an idea:

/*
   # Literate me :-)
   Prosa..
   * item1
   * item2
*/
var awesome = "Awesome";
console.log(awesome);

Usage

Install gulp-ljs:

npm install gulp-ljs --save-dev

Using this plugin is pretty straight forward. For the sake of sanity I replace the extension of the filepath automatically.

var ljs = require('gulp-ljs');

gulp.task('literate', function () {
  gulp.src('path/**/*.js')
    .pipe(ljs())
    .pipe(gulp.dest('path/')) // writes *.md
});

Options

code

Don't include the code in the markup file. Default: true

var ljs = require('gulp-ljs');

gulp.task('literate', function () {
  gulp.src('path/**/*.js')
    .pipe(ljs({code : false}))
    .pipe(gulp.dest('path/'))
});

Keywords

FAQs

Last updated on 18 Aug 2014

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc