The app updates obsolete jQuery code usage to recommended alternatives. Currently, it resolves the following errors:
- jQuery.isFunction() is deprecated
- jQuery.isArray is deprecated; use Array.isArray
- jQuery.expr[':'] is deprecated; use jQuery.expr.pseudos
- jQuery.expr.filters is deprecated; use jQuery.expr.pseudos
- jQuery.fn.click() event shorthand is deprecated
- jQuery.fn.delegate() is deprecated
- jQuery.fn.focus() event shorthand is deprecated
- jQuery.fn.mouseup() event shorthand is deprecated
- jQuery.fn.blur() event shorthand is deprecated
- jQuery.fn.bind() is deprecated
- jQuery.fn.submit() event shorthand is deprecated
- jQuery.fn.resize() event shorthand is deprecated
- The app is an C# Console Application which needs to be compiled and executed. I use MonoDevelop (https://www.monodevelop.com/) but it can run on Visual Studio as well.
In this example, I will use MonoDevelop. You can download and install it.
-
Open jQueryDeprecatedAutoFix.sln with MonoDevelop (or Visual Studio)
-
Edit file paths in file:
jQueryDeprecatedAutoFix/jQueryDeprecatedAutoFix/Program.cs
inputFilePath should contain a valid path to a file you want to update.
outputFilePath should contain a valid path to a updated file location. I prefer it to be different than inputFilePath and then to compare both of the files.
- Compile the App and execute
- You will see logs in console i.e.