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

Upgrade to new WaveDrom #225

Closed
drom opened this issue Jun 11, 2019 · 4 comments
Closed

Upgrade to new WaveDrom #225

drom opened this issue Jun 11, 2019 · 4 comments
Milestone

Comments

@drom
Copy link

drom commented Jun 11, 2019

I have a new version of wavedrom v2.1.2 here: https://github.com/wavedrom/wavedrom
it comes with browserless CLI. https://github.com/wavedrom/wavedrom/releases/tag/v2.1.2
It is a single file application and requires only node.js to run.

node wavedrom.js -i sourceWaveDrom.json5 > result.svg

Current version can produce only SVG. Do we need PNG?

I can release PNG capable version, but that would require normal npm install flow.

Originally posted by @drom in #190 (comment)

@pepijnve
Copy link
Member

It is a single file application and requires only node.js to run.

Would it be possible to provide an executable wrapper script for this? (see https://medium.com/netscape/a-guide-to-create-a-nodejs-command-line-package-c2166ad0452e for an example). The code is already searching for an executable file named wavedrom. If the NPM package can provide that it makes my life a bit easier.

Is there a way to query the version number via the CLI? That will be necessary so I can switch between the older and newer versions of wavedrom.

Current version can produce only SVG. Do we need PNG?

The asciidoctor extension currently reports PNG as a supported output format since the old version was able to produce this. The supported output formats are static at the moment in asciidoctor-diagram. The worst that will happen though is a runtime error if people request pngs with the newer version of wavedrom.

@drom
Copy link
Author

drom commented Jun 11, 2019

Make sense. Will fix.

@drom
Copy link
Author

drom commented Jun 12, 2019

I have published wavedrom-cli v2 on npm
Here is the source code: https://github.com/wavedrom/cli

Generates SVG or PNG
wavedrom-cli --version for version number
wavedrom-cli --help for all options

@pepijnve
Copy link
Member

Perfect. Since the name of the command differs from the earlier version (was just wavedrom) I probably don't even need a version check. 👍

@pepijnve pepijnve added this to the 1.5.19 milestone Jun 12, 2019
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

2 participants