Angelo,

The coffee command takes directories as compile parameters for both src and
output.  The command walks all the directories inside to compile all coffee
files:

coffee -c -o lib src

This command will compile all coffee files in src/**/*.coffee into
lib/**/*.js

You can find more common commands in this cakefile-template ->
https://github.com/twilson63/cakefile-template

Thanks

Tom

On Sun, Jun 10, 2012 at 7:57 PM, Angelo Chen <[email protected]>wrote:

> how to compile an expressjs into js? we might have .coffee files in
> different folders?
>
> On Jun 11, 1:57 am, tjholowaychuk <[email protected]> wrote:
> > for your own app you probably want to require('coffee'), but for npm
> > modules that you want to share definitely compile them to js first
> >
> > On Jun 10, 8:29 am, mgutz <[email protected]> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > That is strange. All coffee does is hook into `require` to compile
> source
> > > on the fly and it only has to do that once per file since node caches
> > > requires. After that, it's node running javascript.
> >
> > > Anyway, compilation is the recommended practice.
> >
> > > On Sunday, June 10, 2012 7:03:19 AM UTC-7, Angelo Chen wrote:
> >
> > > > Hi,
> >
> > > > i use forever to run a js, cpu usage is very low, less than 2%, same
> > > > program in coffeescript and run it this way:
> > > > forever start test.coffee
> > > > cpu went up to 15%
> >
> > > > what is a better way to run coffeescript server, compiled first into
> > > > js or directly :
> >
> > > > coffee app.coffee
>
> --
> 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
>



-- 
Tom Wilson
Jack Russell Software Company ®  LLC
1067 Cliffwood Drive
Mount Pleasant, SC  29464
Phone: 843-606-0637
Email: [email protected]
Web: http://www.jackhq.com
Calendar: http://www.jackhq.com/calendar

-- 
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