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

JavaScript

Ilja Daderko
Ilja Daderko
8,953 Points

Automatically update jQuery version in your "Starter Pack"

Hi,

Today I set down and spent some time on a so called "Starter Pack" that is my own version of.. I guess .. Boilerplate, but without any unnecessary cluster, my own responsive grid system, default styles etc.. you get the point.

One issue that I can think of already is, jQuery. Naturally I included latest version (to date), but we all know it will not take long for a new release to come out, thus my question is, how can I update a version of jQuery automatically. It is located in my footer file -- footer.php

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

I guess it should be simple to just swap the version number (2.0.3) yo current one. I was thinking of making a php script that grabs such number from jQuery website and than updates it, could also be used to update various other files, yet there must be easier / more automatic way to do this ;D

1 Answer

Ilja Daderko
Ilja Daderko
8,953 Points

Yet, I think using google distributed jQuery is better in terms of cache. I know this might make it more difficult to keep it up to date, yet would help in a long run. Also, this approach gives me latest jQuery 1.x version where as I am looking for 2.x one.