-
-
Notifications
You must be signed in to change notification settings - Fork 92
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How we should distribute this CLI #20
Comments
SGMT! Though I think using a custom generator will be a common (most common perhaps?) approach, so workflow of coping and modifying an existing generator should be smooth as well. That probably is better achieved with a documentation:
|
Overall, I like where this is going. I'm not sure generator is the right word here. But I'm not sure what it would be. Naming it converter would be overloaded this this is already a converter. Perhaps producer or composer? I think the default producer/composer should be installed by default just to make it easy to get started. It doesn't hurt to be there. I think the CLI name is getting a little confused/convuloted. asciidoctorjs-pdf reads very awkwardly. Perhaps asciidoctor-pdf.js or even just asciidoctor-pdf (with an understanding that it's unlikely people will be using both the Ruby version and this one). The alternative would be to rename this project to asciidoctor.js-pdf. Then at least asciidoctorjs-pdf would be more logical. |
I'd name the package @asciidoctor/pdf-cli if you're going to use that scheme. |
I'm wondering about this: $ npm install -g @asciidoctor/cli
$ asciidoctor -b pdf source.adoc -o dest.pdf
> Error: unknown backend.
> You might want to run the following command to support this backend:
> npm install @asciidoctor/backend-pdf
$ npm install -g @asciidoctor/backend-pdf
$ asciidoctor -b pdf source.adoc -o dest.pdf
$ asciidoctor -b pdf --generator ./my-generator.js -o dest-alt.pdf |
Lot of ideas! 😀 Official backends
For now ignore the naming, I'm just focusing on the behavior. In other words, it means that the CLI knows a set of "official" backends:
And if the user requests an "official" backend (without explicitly using the Should we create an issue in https://github.com/asciidoctor/asciidoctor-cli.js/ to continue the discussion ? Add a
|
I will create issues in the Asciidoctor.js CLI repository so we can discuss each issue separately 😉 |
Related issues: 💬 💡 Feel free to jump in and share your ideas and opinions |
What I have in mind is something like:
Then you can convert a document to a PDF:
We could also publish other generator:
Of course it will be still possible to use local "generator":
Please note that currently a generator is nothing more than a template converter but we could decide to introduce more features in the generator.
ping @oncletom @mojavelinux @matklad
The text was updated successfully, but these errors were encountered: