One of our developers used jquery on a couple of pages and now we're not sure which pages those are.

Is there a way to test for dependencies? I.e., given a collection of pages, which need jquery?

  • How is jQuery included in the project? – MrWhite Oct 20 '15 at 20:41
  • Commandline: fgrep '$(' -R * | more – Martijn Oct 21 '15 at 10:24

To expand on Martijn's comment...

jquery code heavily uses a function name $ . jquery code is littered with experssions like $(this) and $('#foo'). If you search your files for $( you will likely identify any that have jquery code embedded in them.

  • I guess I have to upvote this then. – Martijn Jan 19 '16 at 14:53

If he used some code based on JQuery, he was forced to implement JQuery into the head of these given pages, where JQuery based code worked. Non case-sensitive search in all files for jquery should do the trick.

Beside of this, developer tools (chrome or ff) would rise an error alert, if any code misses its library. But so you should go page by page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.