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 = ;var htmlFiles = ;
The 2nd argument may be omitted if not specifying asciidoctor.js options.
Example usage with Ember CLI in ember-cli-build.js
:
var EmberApp = ;var Funnel = ;var asciidocToHtml = ; module { var app = defaults ...; var asciidocHtmlAssets = ; ... return app;};
The above snippet will convert all AsciiDoc input files under the asciidoc
directory in the project root and place output files under dist/assets
.