Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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