Simple CLI - #71
Conversation
Not related to this PR, but good to have.
|
Just a suggestion, |
|
@douglascamata the CLI does exactly that: it reads from stdin. So yeah, |
|
@jmendeth awesome, thanks for the tip! |
|
@jmendeth This looks great! Like I've said on some of the other requests, we're getting our CLA worked out right now; I'll let you know when we figure it out so we can merge this! |
|
Okay! 2014-09-18 20:52 GMT+02:00 Emily Eisenberg notifications@github.com:
|
|
We've set up our CLA, found at www.khanacademy.org/r/cla Please sign it so we can merge this in! |
|
Signed. (but I don't have a phone) |
…cityForStepImage-SPL Fixed some styling for webview and step image
This PR adds a simple command line interface to KaTeX. (closes #55)
It just reads TeX from standard input (until EOF is found), renders it through
katex.renderToString, and outputs the HTML to standard output. Given that KaTeX needs no or little customization, command-line arguments are ignored for now.The CLI (
cli.js) is exported viapackage.json, so that installing KaTeX globally:Will also install a
katexcommand system-wide, that is a symlink to the CLI. Then, this:outputs
This allows webservers written in other languages to easily interface with KaTeX to render math server-side.