asciidoctor-liquibase
v1.2.5
Published
Asciidoctor.js extension to render liquibase changesets as entity relationship diagram
Downloads
49
Maintainers
Readme
Asciidoctor Liquibase Extension
An extension for Asciidoctor.js to convert Liquibase changeset files to entity relationship diagrams!
Install
Node.js
Install the dependencies:
npm i asciidoctor asciidoctor-liquibase
Create a file named liquibase.js
with following content and run it:
const asciidoctor = require('@asciidoctor/core')()
const liquibase = require('asciidoctor-liquibase')
const input = 'liquibase::db.changelog-master.yaml[]'
liquibase.register(asciidoctor.Extensions) // <1>
console.log(asciidoctor.convert(input, { safe: 'safe' }))
const registry = asciidoctor.Extensions.create()
liquibase.register(registry) // <2>
console.log(asciidoctor.convert(input, { safe: 'safe', extension_registry: registry }))
<1> Register the extension in the global registry <2> Register the extension in a dedicated registry
Antora Integration
If you are using Antora, you can integrate Liquibase in your documentation site.
Install the extension in your playbook project:
$ npm i asciidoctor-liquibase
Register the extension in your playbook file:
asciidoc: extensions: - asciidoctor-liquibase
https://docs.antora.org/antora/2.3/playbook/configure-asciidoc/#extensions
Contributing
Setup
To build this project, you will need the latest active LTS of Node.js and npm (we recommend nvm
to manage multiple active Node.js versions).
This project use decision tables to generate code, so you need a license of https://lohrfink.de.
Building
- Install the dependencies:
npm i
- Generate a distribution:
npm run dist
When working on a new feature or when fixing a bug, make sure to run the linter and the tests suite:
npm run lint
npm run test