>  To avoid a js compilation step or having to run a watcher ...

Why in the world are you doing that?  One command and everything is
automatic and transparent.  I find myself forgetting that a compilation
even happens.

On Wed, Aug 8, 2012 at 6:07 AM, Alan Hoffmeister
<[email protected]>wrote:

> Well, this sound like your project is not well structured.
> As I could undestand you have the main app file that have CS required
> and other process that doesn't have it but try to access CS files,
> this sounds dirty :D
>
> The solution I would adopt would be to create some kind of bootstrap
> that could be loaded by the main process and any other secundary:
>
> //bootstrap.js
> var cs = require('coffee-script');
> var myModule = require('./mymodule');
>
> module.exports = myModule;
>
> Voila, now you can require this bootstrap from everywhere without the
> need to complite the CS.
>
> --
> Att,
> Alan Hoffmeister
>
>
> 2012/8/8 Krzysztof Baranowski <[email protected]>:
> > Hey folks,
> >
> > So I have an app where all the files are coffeescript. To avoid a js
> > compilation step or having to run a watcher I have a
> > "require('coffee-script')" statement before everything else in the
> program,
> > which lets me require() coffee files directly from other coffee files.
> >
> > Problem is, one of the libraries I'm using requires up which spawns child
> > processes with fork(). These processes in turn try to require() my app
> > files, which are in coffeescript, and fail.
> >
> > So I'd like a way to ensure that process spawn with coffeescript
> available
> > to avoid this. Or maybe I could monkey patch Up or something.
> >
> > Into your capable hands I commit my question, nodejs community!
> > Chris
> >
> > --
> > Job Board: http://jobs.nodejs.org/
> > Posting guidelines:
> > https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> > You received this message because you are subscribed to the Google
> > Groups "nodejs" group.
> > To post to this group, send email to [email protected]
> > To unsubscribe from this group, send email to
> > [email protected]
> > For more options, visit this group at
> > http://groups.google.com/group/nodejs?hl=en?hl=en
>
> --
> Job Board: http://jobs.nodejs.org/
> Posting guidelines:
> https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
> You received this message because you are subscribed to the Google
> Groups "nodejs" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to