node-webkit and coffeescript - how to?

4 views
Skip to first unread message

alex...@gmail.com

unread,
Oct 2, 2012, 5:07:44 AM10/2/12
to node-...@googlegroups.com
How to use coffeescript with node-webkit?

Zhao Cheng

unread,
Oct 2, 2012, 6:48:07 AM10/2/12
to node-...@googlegroups.com
On Tue, Oct 2, 2012 at 5:07 PM, <alex...@gmail.com> wrote:
> How to use coffeescript with node-webkit?

Google "use coffeescript in browser", our Wiki also mentioned it too:
https://github.com/rogerwang/node-webkit/wiki/How-to-use-node.js-web-modules-in-node-webkit

--
Cheng
Intel Open Source Technology Center

alex...@gmail.com

unread,
Oct 2, 2012, 6:51:13 AM10/2/12
to node-...@googlegroups.com
But stylus, how to?

вторник, 2 октября 2012 г., 19:48:08 UTC+9 пользователь Zhao Cheng написал:

Stefan Thomas

unread,
Oct 2, 2012, 6:52:34 AM10/2/12
to node-...@googlegroups.com
You can also use the normal way of including coffee script modules in
Node.js. (I assume, haven't tested this personally.)

To do this, make sure you require the coffee-script module, before
requiring a module written in CoffeeScript.

For example, if you have a CoffeeScript module called foo.coffee, you'd do:

require("coffee-script");
require("./foo");

See also:

http://stackoverflow.com/questions/4768748/requireing-a-coffeescript-file-from-a-javascript-file-or-repl

Zhao Cheng

unread,
Oct 3, 2012, 1:49:15 AM10/3/12
to node-...@googlegroups.com
You can compile your stylus code into CSS after page is loaded and
dynamically add it to DOM. You need to figure out how to do that on
your own.
Reply all
Reply to author
Forward
0 new messages