Clarification about manifest.js

39 views
Skip to first unread message

Francesco Belladonna

unread,
Feb 2, 2013, 2:04:58 PM2/2/13
to jsclas...@googlegroups.com
I'm working a bit on jsbuild to understand how it works for packaging used classes.
I have some questions about it: first of all, can I put my requires JS.Class classes in the manifest? Or should I only place "custom" (like jquery) requirements?

I'm doing a rake task that runs jsbuild for me (clear previous builds), update jsclass node package if required and place my build in vendor/assets/javascripts/jsclass directory, but I should configure somewhere which module I should use.
Because I don't know the correct "pipeline" I should use, I have to understand where I have to specify JS.Class modules, if I should place those directly in command line or I can place them in a javascript file.

Also, you mentioned (in the other topic) the possibility to just include JS.Class prototypes instead of the core for really small projects. How do you achieve this? Which files should be included?

James Coglan

unread,
Feb 5, 2013, 7:29:34 PM2/5/13
to jsclas...@googlegroups.com
On 2 February 2013 19:04, Francesco Belladonna <francesco....@gmail.com> wrote:
I'm working a bit on jsbuild to understand how it works for packaging used classes.
I have some questions about it: first of all, can I put my requires JS.Class classes in the manifest? Or should I only place "custom" (like jquery) requirements?

You can absolutely have packages in your manifest that depend on JS.Class packages. It uses the same system internally so if your package has .require('JS.Set') then the loader will get core.js, enumerable.js and hash.js for you because the dependencies are all configured the same way.
 
I'm doing a rake task that runs jsbuild for me (clear previous builds), update jsclass node package if required and place my build in vendor/assets/javascripts/jsclass directory, but I should configure somewhere which module I should use.
Because I don't know the correct "pipeline" I should use, I have to understand where I have to specify JS.Class modules, if I should place those directly in command line or I can place them in a javascript file.

I would recommend stating as much dependency info as possible in manifest.js, since this makes automating builds and downloads easier and it means the package system can work out the correct file order for you.
 
Also, you mentioned (in the other topic) the possibility to just include JS.Class prototypes instead of the core for really small projects. How do you achieve this? Which files should be included?

I'm not sure what you mean by "just include JS.Class prototypes instead of the core". 

Francesco Belladonna

unread,
Feb 5, 2013, 9:28:25 PM2/5/13
to jsclas...@googlegroups.com
I think I misunderstood, I read

"JS constructors+prototypes" as "JS.Class constructors+prototypes"

from this discussion: https://groups.google.com/forum/?fromgroups=#!topic/jsclass-users/WYiYLRD1l4Y
here: * I use core.js when my app benefits from a sophisticated object system, but for smaller projects I just use JS constructors+prototypes
Reply all
Reply to author
Forward
0 new messages