Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Development Tools

Creating a repository/CDN

I know its not a standard CDN as it would be hosted on a single server and not various servers depending on client IP. I can't use Google's CDN because I am developing for an infrastructure that doesn't allow it (yay! DOD). However I find that I am constantly using JQuery both 1.10 and JQuery 2, as well as other like Twitter Bootstrap both 2 and 3 and both the CSS and the JavaScript portions of it.

Rather than including this in the files locally I rather just call them and include them from a central source like "my-secure-server/vendor/js " for example.

I need help figuring out the best file architecture to store multiple version of multiple vendor stuff. Do I do an assets/css/vendor/ and like wise an assets/js/vendor or do I sort them by vendor first and then type so assets/vendor/css and assets/vendor/js? Where do I sort by version? assets/vendor/version/css or maybe assets/vendor/js/version.

I am looking for efficiency, any help is appreciated.

James Barnett
James Barnett
39,199 Points

So you want to standardize your file organization for assets hosted on a local server?

Aye. Rather than including all those assets on a given projects virtual server just link to them from a single source. Its just coming up with the most logical and cleanest structure. I wasn't the first Dev here and I likely won't be the last so if I can make things as "best practice" as I can.

2 Answers

James Barnett
James Barnett
39,199 Points

Personally I think the best way to do it is:

-assets
  -css
    -vendor
      -version
  -javascript
   -vendor
     -version
  -images

Type > vendor > version

Awesome thanks