wavedrom / cli

CLI for WaveDrom
https://wavedrom.com
MIT License
61 stars 12 forks source link

Supply exit status code on exit #6

Closed jwcxz closed 8 years ago

jwcxz commented 8 years ago

Adds error checking for:

If the output is successfully produced, returns the status code 0. Otherwise returns 1.

jwcxz commented 8 years ago

Use case is that this helps with anyone using Wavedrom in, for example, a Makefile, so that make stops executing if the diagram failed to build.

drom commented 8 years ago

@jwcxz great! Thank you for the code. bin/wavedrom-cli.js is actually build by build-wavedrom-cli.sh script. So you source changes should probably go to src/p5.js first. Could you fix it?

jwcxz commented 8 years ago

@drom no problem; sorry that I got a bit confused there. In addition to making the changes to src/p5.js, shall I also run build-wavedrom-cli.sh and include the newly-generated bin/wavedrom-cli.js as part of the commit?

Thanks for your guidance.

jwcxz commented 8 years ago

I've done both, but as separate commits. I can revert the last commit if desired.

drom commented 8 years ago

@jwcxz You did it very well! Thanks for the contribution.