Stamping 'depends' into package.json / nested dependencies

52 views
Skip to first unread message

Rafael B

unread,
Apr 30, 2013, 4:46:35 AM4/30/13
to vol...@googlegroups.com
Is there a way to stamp 'depends' into the package.json, somehow declaring nested dependencies ?

For example:

{
  "amd": {},
  "volo": {
    "baseDir": "media/js/libs/",
    "dependencies": {
      "jquery.flexslider": "github:woothemes/FlexSlider/master#./jquery.flexslider.js",
      "jquery.prettyphoto": "github:scaron/prettyphoto/master#js/jquery.prettyPhoto.js",
      "jquery.quicksand": "github:razorjack/quicksand/v1.3"
    }
  }
}

I'd like to be able to simply run: volo add
But currently I must run: volo add depends=jquery

But what happens if not all of my dependencies depend on jQuery ?
Is there a way to declare nested dependencies ?

James Burke

unread,
Jun 3, 2013, 7:39:17 PM6/3/13
to vol...@googlegroups.com
Sorry for the very long delay in a response:

This is handled by creating amd.json files in the "overrides" repo for volojs:

https://github.com/volojs/repos

Example for documentcloud/backbone:

https://github.com/volojs/repos/blob/master/documentcloud/backbone/amd.json

So if you do some pull requests to volojs/repos for the above
owner/repo combinations and specify an amd.json for those repos, you
will then fix it for any volo user.

James
> --
> You received this message because you are subscribed to the Google Groups
> "volojs" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to volojs+un...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

Rafael B

unread,
Jun 19, 2013, 5:12:37 PM6/19/13
to vol...@googlegroups.com
Thanks! 
Can this technique work with jquery-ui ? 

I've tried your "jqueryui-amd" tool, but my application's package.json has an "amd: {}" property in its package.json. So when running "jqueryui-amd", the jqueryui js files will end up with a double `define()` ...
Reply all
Reply to author
Forward
0 new messages