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.

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.