Skip to content
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

The CLI should suggest to require a Node.js package if the backend is not found #42

Closed
ggrossetie opened this issue Dec 7, 2018 · 0 comments

Comments

@ggrossetie
Copy link
Member

The user may not fully understand what is included or not but the CLI can understand the intent and thus suggest a resolution.

For instance:

asciidoctorjs -b blog source.adoc -o dest.html
> Error: unknown backend.
> You might want to require a Node.js package with --require option to support this backend.

We could also suggest to install an "official" backend (please note that this feature depends on #41):

asciidoctorjs -b revealjs source.adoc -o dest.html
> Error: unknown backend.
> You might want to run the following command to support this backend:
> npm install asciidoctor-reveal.js

So if the user requests an "official" backend (without explicitly using the --require option) then we should try to load this "official" backend. If it fails, we should suggest to install the package using npm.

ggrossetie added a commit to ggrossetie/asciidoctor-cli.js that referenced this issue Dec 17, 2018
ggrossetie added a commit that referenced this issue Mar 21, 2019
Resolves #42, suggest to require a Node.js package if the backend is not found
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant