Nutella with Pepperoni and Mushrooms
    Have ideas to improve npm?Join in the discussion! »

    snowpack-plugin-asciidoctor
    TypeScript icon, indicating that this package has built-in type declarations

    0.0.2 • Public • Published

    Quick start

    yarn add snowpack-plugin-asciidoctor --dev

    Update your snowpack config:

    // ./snowpack.config.json
    {
      "plugins": [
        ["snowpack-plugin-asciidoctor", { /* see "Plugin Options" below */ }],
      ]
    }
    // ./test.adoc
    
    = My Asciidoctor File
    
    :myVar: 'a value for my variable'
    // ./your-file.js
    
    import { doc } from './test.adoc'
    
    console.log('Doc', doc)
    
    // Prints (output)
    {
      filePath: '/home/your/test.adoc'
      html: '<h1>My Asciidoctor File</h1>'
      metadata: {
        //  asciidoctor document attributes https://asciidoctor.org/docs/user-manual/#attribute-catalog
        // it contains also any attribute you declared in the asciidoctor file, e.g:
        myVar: 'a value for my variable'
      }
    }

    Plugin Options

    Plugin options are passed directly to the Asciidoctor.js compiler. You can find the full attribute catalog at https://asciidoctor.org/docs/user-manual/#attribute-catalog.

    Acknowledgements

    LICENSE

    MIT

    Install

    npm i snowpack-plugin-asciidoctor

    DownloadsWeekly Downloads

    3

    Version

    0.0.2

    License

    MIT

    Unpacked Size

    65.9 kB

    Total Files

    26

    Last publish

    Collaborators

    • avatar