Open ggrossetie opened 2 years ago
We can take inspiration from https://github.com/asciidoctor/asciidoctor-tabs
I guess the package name should be @asciidoctor/chart
.
//cc @mojavelinux
I support the name @asciidoctor/chart
as its consistent with how we've named major integration extensions (like Asciidoctor Diagram).
There are three key aspects to supporting the transpiled package:
The transpiled code should never be checked into the repository because that file ends up either being out of date or constantly being updated. Neither is ideal.
The npm script could use the opal-compiler via npx instead of having to declare opal-compiler as a dependency. I might switch to that in Asciidoctor Tabs.
Set up an index.js and extensions.js file that require the transpiled code
I prefer to define index.js so the package can be required directly from the CLI (e.g., -r @asciidoctor/chart
). I then create an extensions.js file that provides access to the methods needed to register the extension from the API (which index.js uses), as well as access to the extension classes themselves.
And publish to npmjs as
@asciidoctor/chart
?@asciidoctor/chart-extension
?We should make sure that we are not missing a feature from https://github.com/mogztter/asciidoctor-chart. Once verified, we can deprecated
asciidoctor-chart
.