1

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?

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

2 Answers 2

1

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.

1
  • I guess I have to upvote this then.
    – Martijn
    Jan 19, 2016 at 14:53
0

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 and acknowledge you have read our privacy policy.

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