Closed MattWilcox closed 9 years ago
Hi, @MattWilcox . Building such a script just requires a few lines of code. Basically parse out the arguments and supply them to node-kit. But the quickest route is just to use another existing tool: pykitlangc.
Example : pykitlangc input.kit output.html
A project of mine, grunt-codekit, used to wrap that program earlier, before node-codekit was available. It is very fast and does a good job. Might not produce 100% identical output to this one or the reference, but that's just edge cases relating to newline handling.
I hacked it together for you :-) Just do this
npm install -g fatso83/node-kit-cmd
and build files like this
node-kit imports.kit ut.html
For future reference, @MattWilcox, I would study the 10 lines of code I wrote to see how easy it is to cobble together a command line tool from existing libraries.
Thanks! I'll give that a try :)
Hey @MattWilcox
There is no command line to node-kit
, it is a standalone compiler for the Kit language.
The code @fatso83 has linked above should get you out of trouble.
Hello,
My apologies if this is a stupid question, I am just starting with npm and my intent is to replace my CodeKit usage. I've been following http://blog.keithcirkel.co.uk/how-to-use-npm-as-a-build-tool/ and want to integrate node-kit instead of Jade.
I don't understand how to use node-kit from the command line to include as a script though. With jade, for example, I can do this:
"scripts": { "build:markup": "jade assets/markup/index.jade --obj assets.json -o dist" }
I'm struggling to find how the npm ecosystem documents such command line usage, and I can't figure out how to get something equivalent in node-kit.
Thanks, Matt