kaffeine icon indicating copy to clipboard operation
kaffeine copied to clipboard

Executing kaffeine files

Open felixge opened this issue 14 years ago • 7 comments

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?

felixge avatar Apr 15 '11 22:04 felixge

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

weepy avatar Apr 16 '11 10:04 weepy

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.

felixge avatar Apr 16 '11 10:04 felixge

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.

weepy avatar Apr 16 '11 11:04 weepy

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

felixge avatar Apr 16 '11 11:04 felixge

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

Tapped on my fone

On 16 Apr 2011, at 12:49, felixge [email protected] 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

weepy avatar Apr 16 '11 12:04 weepy

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

felixge avatar Apr 16 '11 13:04 felixge

hey im there now - for a little while

weepy avatar Apr 16 '11 13:04 weepy