Hi everybody -
I saw the message from a couple months back, encouraging folks to integrate Jam into other frameworks. I would like to integrate it into
Sails.js, a new framework that is pretty slick. But I'm in a little over my head.
>From my outside view, it seems like Jam does 2 things:
- automatically installs frontend packages
- combines those packages and inserts them via RequireJS
For Sails integration, I would like to use that first role - but bypass the second. Sails has its own Javascript bundler/handler, and if I can hand it an array of paths to JS files, then it could pull these files into its bundle.
Ideally, I'd be able to do something like this:
var libraries = jam.getLibs("/path/to/app");
This would then give me an array like so:
['/scripts/jquery/dist/jquery.min.js', '/scripts/mondernizr/modernizr.min.js', 'scripts/some_other_lib/script.js']
I tried experimenting with the ls method and some other methods inside Jam, but I got lost pretty quick. So figured I'd ask here if anybody has ideas on how I could do this - or if anybody would be interested in helping me add a method like this? I think it could be very useful for other folks trying to tie Jam into their stacks. (RequireJS bundling is just not for everybody.)
Thanks for any suggestions!
dylan
--