Heavy? Why? It is amazing features!
Harmony needed for catch unknown properties and loads modules to them.
Fiber needed for stoping application until modules will be installed
(installation is async process)


2013/1/3 Floby <[email protected]>

> Harmony and fibers are really heavy dependencies, Aren't they. Why does
> this need harmony ?
>
>
> On Wednesday, 2 January 2013 20:21:53 UTC+1, nin jin wrote:
>>
>> You need to run your script with *--harmony* parameter!
>>  Autoloader
>>
>> Connect autoloader:
>>
>> $= require( 'jin' ).loader()
>>
>> Then use this pattern to work with modules:
>>
>> var app= $.connect( $.connect.static( 'public' ) )
>> $.http.createServer( app ).listen( 80 )
>>
>> Instead of:
>>
>> var connect= require( 'connect' )
>> var http= require( 'http' )
>> var app= connect( connect.static( 'public' ) )
>> http.createServer( app ).listen( 80 )
>>
>> You can use customized loaders:
>>
>> $my= $.jin.loader( './' )
>> $my.init() // loads ./init.js
>>
>> If module is not installed, $.jin.loader tries to install that by npm.
>> But this feature uses fibers! Wrap your application to fiber by "sync"
>> module:
>>
>> $.sync( function( ){
>>     var app= $.connect( $.connect.static( 'public' ) )
>>     $.http.createServer( app ).listen( 8080 )
>> } )
>>
>> This code may autoinstall "connect" module if needed, loads them, and
>> then run the server.
>>
>  --
> 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