XoopsCore25 icon indicating copy to clipboard operation
XoopsCore25 copied to clipboard

Include jquery plugin map files in release

Open zyspec opened this issue 4 years ago • 4 comments

To help with developer debug, etc. it would be useful to include the jquery map files when available. Specifically the jquery.jgrowl.map and the jquery.form.min.js.map files in the xoops_lib/Frameworks/jquery/plugins folder.

The files are small and help developers. Especially now that Chrome is complaining about the missing map files.

zyspec avatar Apr 08 '20 17:04 zyspec

same with css.min.map files for xbootstrap theme

zyspec avatar Apr 11 '20 16:04 zyspec

@zyspec And for xswatch4 too?

alain01 avatar Apr 11 '20 17:04 alain01

Yes,  we just need to look at all of the minimized .css and .js files to see if they need a map file included. The xswatch4 bootstrap.min.css doesn't need a map file but the bootstrap.bundle.min.js included with xswatch4 does. On Saturday, April 11, 2020, 12:08:40 PM CDT, alain01 [email protected] wrote:

@zyspec And for xswatch4 too?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.

zyspec avatar Apr 11 '20 21:04 zyspec

There is a complication with locating the map files for resouces accessed through browse.php.

As an example, jquery.jgrowl.min.js has a line that identifies the URL for the map file: //# sourceMappingURL=jquery.jgrowl.map

If the jquery.jgrowl.min.js file was served directly, the browser would locate the jquery.jgrowl.map file using normal relative URL processing. However, we are pulling it using /browse.php, so the relative URL points to the site's top level, i.e. https://site.url/jquery.jgrowl.map

To locate a map file in the xoops_lib/Frameworks we would need to use something like this: //# sourceMappingURL=browse.php?Frameworks/jquery/plugins/jquery.jgrowl.map

That URL would need to be either rewritten in the .js file or specified in a "SourceMap" HTTP header.

I am still looking at this, but I just wanted to mention that it is more complicated than just copying in the .map files for any resources served using browse.php.

geekwright avatar Apr 12 '20 06:04 geekwright