davidmerfield / Typeset

An HTML pre-proces­sor for web ty­pog­ra­phy
https://typeset.lllllllllllllllll.com/
Creative Commons Zero v1.0 Universal
2.41k stars 52 forks source link

Command-line tool #2

Closed sebastien closed 9 years ago

sebastien commented 9 years ago

It would be great to have a command line tool to use typeset as a post-processor (bearing in mind that typeset is sometimes a reserved shell command).

davidmerfield commented 9 years ago

Making this support usage from the command line would be straightforward. It would involve extra conditionals to accept arguments passed via the command line, but installation and usage would look something like this:

npm install -g typeset
typeset index-in.html index-out.html

I'd be happy to review a pull request if you'd like to make these modifications yourself – otherwise I'll add it to the list of things to do!

sebastien commented 9 years ago

Some recommendations to make the command line tool UNIX-friendly

I don't have much experience with node, but that might be a fun learning experience.

davidmerfield commented 9 years ago

Thanks @faheempatel for your pull request. I'll keep this issue open until I work out how to change the tool's name from typeset, since it's reserved.

davidmerfield commented 9 years ago

I'd also like it accept input via stdin. Will investigate

faheempatel commented 9 years ago

No worries, thanks for making it :) You can change the name of the tool by changing the key here: https://github.com/davidmerfield/Typeset/blob/master/package.json#L7