On Thu, May 2, 2013 at 2:53 PM, Vincent Massol <vincent(a)massol.net> wrote:
Hi devs,
ATM the solution is described here:
http://dev.xwiki.org/xwiki/bin/view/Community/Debugging#HDebuggingJavaScript
What would you think about doing this instead:
* Package both the minimized and the non minimized version in our WAR (it shouldn't
add too much weight to our overall WAR size)
* Have a directory structure like this:
resources/.../<module>/
|_ <non minified js file here>
|_ min/<minified js files here>
* This would allow to put in our xwikivars.vm something like (pseudo code):
#if ("$!request.minify" == 'false')
#set ($jsDir = '/')
#else
#set ($jsDir = 'min/'
#end
* Then everywhere we reference JS files we use $jsDir. For example in
attachmentsinline.vm:
$xwiki.jsfx.use('uicomponents/widgets/${jsDir}upload.js',
{'forceSkinAction': true, 'language': ${xcontext.language}})
…
This would allow to remove the "debug" profile and make it much faster to debug
XWiki issues, even in production systems.
WDYT?
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
Sounds good, also that should fix
http://jira.xwiki.org/browse/XINFRA-81.
--
Thomas Mortagne