weepy / kaffeine

Extended Javascript for Pros
http://weepy.github.com/kaffeine/
MIT License
180 stars 16 forks source link

Executing kaffeine files #21

Open felixge opened 13 years ago

felixge commented 13 years ago

I might be doing this wrong, but I was hoping to be able to execute kaffeine files with node.js directly by typing:

$ kaffeine my_file.k

But currently that seems to do nothing. Is that the expected behavior?

weepy commented 13 years ago

I must have broken it a while ago and not noticed - I've been using the node API :

(new (require("kaffeine"))()).compile(txt)

I'll be able to take a look at this fixing this on Monday

felixge commented 13 years ago

Do you also hook in require.extensions?

Btw. do you think there is any chance of getting rid of the 'glob' dependency? I would prefer being able to include kaffeine in my modules directly, so compiling is a little annoying.

weepy commented 13 years ago

Yes - hooked into .extensions. You can run kaffeine files directly if you've already done require("kaffeine") somewhere. Also there's a knode binary so you can knode myserver.k.

Sure I can remove glob - as it's not directly needed.

felixge commented 13 years ago

Cool, thanks for the tips. I'll experiment further!

weepy commented 13 years ago

No probs. Let me know how you get on ^_^

Tapped on my fone

On 16 Apr 2011, at 12:49, felixge reply@reply.github.com wrote:

Cool, thanks for the tips. I'll experiment further!

Reply to this email directly or view it on GitHub: https://github.com/weepy/kaffeine/issues/21#comment_1013500

felixge commented 13 years ago

Will do. Do you have time to chat today? If so just ping me here and I'll come in the koffeine irc channel.

weepy commented 13 years ago

hey im there now - for a little while