Socket
Book a DemoInstallSign in
Socket

broccoli-asciidoc

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

broccoli-asciidoc

An AsciiDoc filter for Broccoli using asciidoctor.js.

0.2.1
latest
Source
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

broccoli-asciidoc

An AsciiDoc filter for Broccoli using asciidoctor.js. It converts AsciiDoc files (*.asciidoc, *.adoc or *.asc) to HTML as part of a Broccoli build.

Since asciidoctor.js is a pure JavaScript implementation of AsciiDoc, no external dependencies are necessary.

Installation

Install with:

npm install --save-dev broccoli-asciidoc

Usage

Basic usage in Brocfile.js:

var asciidocToHtml = require('broccoli-asciidoc');
var htmlFiles = asciidocToHtml(
  'path/to/asciidoc/files',
  { /* asciidoctor.js options */ });

The 2nd argument may be omitted if not specifying asciidoctor.js options.

Example usage with Ember CLI in ember-cli-build.js:

var EmberApp = require('ember-cli/lib/broccoli/ember-app');
var Funnel = require('broccoli-funnel');
var asciidocToHtml = require('broccoli-asciidoc');

module.exports = function(defaults) {
  var app = new EmberApp(defaults, {...});
  var asciidocHtmlAssets = Funnel(
    asciidocToHtml('asciidoc'),
    {
      destDir: 'assets'
    });
  ...
  return app.toTree([asciidocHtmlAssets]);
};

The above snippet will convert all AsciiDoc input files under the asciidoc directory in the project root and place output files under dist/assets.

Keywords

broccoli-plugin

FAQs

Package last updated on 05 May 2016

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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.