if you use UMD wraps, your code will run in the browser and in node without any 
changes or build steps. 

https://github.com/DimitarChristoff/primish/blob/master/emitter.js#L106-L114 - 
especially if you don’t care about AMD or exports to global, it’s easy to pass 
deps - even more complicated ones.

if you care about all three and have a more complex dependency tree, you can 
still resolve them.
https://github.com/epitome-mvc/Epitome/blob/master/src/epitome-model.js#L175-L185

bottom line: any of these files will work under node or the browser without any 
modification.

--
Dimitar Christoff

"JavaScript is to JAVA what hamster is to ham"
@D_mitar - https://github.com/DimitarChristoff

On 4 Dec 2013, at 11:46, santos <[email protected]> wrote:

> Thank you very much,
> 
> I finally managed to make prime work for my classes in the browser.
> 
> For now i'm wrapiing up the prime and emitter module using the console like 
> that
> 
> $ wrup -r prime ./node_modules/prime/prime.js -o ./public/js/prime.js
> $ wrup -r emitter ./node_modules/prime/emitter.js -o ./public/js/emitter.js
> 
> Now, I'm not sure how to do that in my node application, I will try it.
> 
> In primish we had "options", where can i find it in prime?
> 
> regards
> 
> 
> 
> -- 
>  
> --- 
> You received this message because you are subscribed to the Google Groups 
> "MooTools Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> For more options, visit https://groups.google.com/groups/opt_out.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"MooTools Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to