Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asciidoctor-loader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asciidoctor-loader

asciidoctor-loader for webpack

  • 0.1.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by100%
Maintainers
1
Weekly downloads
 
Created
Source

asciidoctor loader for webpack

Installation

npm install asciidoctor-loader --save-dev

Usage

Documentation: Using loaders

var readme = require('html!asciidoctor!./README.adoc');
// => returns parsed file content

Config

Config examples for loading asciidoctor files.

Webpack 1

module.exports = {
  module: {
    loaders: [
      { test: /\.adoc$/, loader: "html!asciidoctor" }
    ]
  }
};

Webpack 2

    rules: [
        {
            test: /\.adoc/,
            use: [
                {
                    loader: "html-loader",
                     options: {
                        interpolate: 'require'
                     }
                },
                {
                    loader: "asciidoctor-loader",
                    options: {
                        attributes: 'showtitle'
                    }
                }
            ]

        }
    ]

The attribute showtitle allows h1 headers to be rendered.

Use the html-loader option interpolate to enable the asciidoc include::[] syntax.

Files loaded through include::[] will be affected from other webpack loaders.

License

MIT (http://www.opensource.org/licenses/mit-license.php)

Keywords

FAQs

Package last updated on 18 Sep 2017

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc