Invoking Docker commands from Electron

We have already generated an example HTML file from the markdown source earlier in this chapter. You used the following command to do so:

docker run -v `pwd`:/source denysvuika/pandoc -f markdown -t html5 test.md -o test.html

Our editor needs to perform the following steps to run the same command programmatically:

  • Send the markdown text to the Node.js process.
  • Save the markdown text to the local drive.
  • Invoke the Docker command to generate the HTML output.
  • Open the browser with the end result (this is optional).

Let's go through this now, starting with sending the markdown text to the Node.js process.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.22.171.136