<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
	<title>jQuery Grid Plugin - jqGrid - Topic: generate jquery.jqGrid.map.js in the next release of jqGrid</title>
	<link>http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid</link>
	<description><![CDATA[Grid plugin]]></description>
	<generator>Simple:Press Version 5.7.5.3</generator>
	<atom:link href="http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid/rss" rel="self" type="application/rss+xml" />
        <item>
        	<title>tony on generate jquery.jqGrid.map.js in the next release of jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid#p31441</link>
        	<category>Releases</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid#p31441</guid>
        	        	<description><![CDATA[<p>Thanks Oleg,</p>
<p>Â </p>
<p>Will do the needed.</p>
<p>By the way the jQuery plugin repository is stoping to function. I do not know why.</p>
<p>Please <a href="http://plugins.jquery.com/" target="_blank">look here</a></p>
]]></description>
        	        	<pubDate>Wed, 10 Dec 2014 18:00:48 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on generate jquery.jqGrid.map.js in the next release of jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid#p31435</link>
        	<category>Releases</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid#p31435</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>the fileÂ <strong>jquery.jqGrid-4.7.0.zip</strong> with the new version of jqGrid (from the official trirand <a href="http://www.trirand.com/blog/?page_id=6" target="_blank">download page</a>) don't include source map file. Moreover I made some tests and could see small problem in generation of the source map: the sources property from the source map file. It seems to me that one should add small step to the distribution of jqGrid.</p>
<p>Let us we want that debugging of <strong>jquery.jqGrid.min.js</strong> in Google Chrome or Firefox would show the source lines ofÂ <strong>jquery.jqGrid.src.js</strong>. To implemntÂ this one could addÂ the fileÂ <strong>jquery.jqGrid.min.map</strong> created byÂ closure compiler. One need just verify that the last line ofÂ <strong>jquery.jqGrid.min.js</strong>Â contains the following</p>
<div class="sfcode">
<pre class="brush-javascript syntax">//@ sourceMappingURL=<strong>jquery.jqGrid.min.map</strong></pre></div><p>If one have <strong>jquery.jqGrid.min.map</strong> one should verify that and that the file contains the following linesÂ </p>
<div class="sfcode">
<pre class="brush-javascript syntax">{
"version":3,
"file":"<strong>jquery.jqGrid.min.js</strong>",
"sources":["<strong>jquery.jqGrid.src.js</strong>"],
...
}</pre></div><p>It makes correct mapping fromÂ <strong>jquery.jqGrid.min.js</strong>Â to <strong>jquery.jqGrid.min.map</strong>Â and from <strong>jquery.jqGrid.min.map</strong>Â to <strong>jquery.jqGrid.src.js</strong>.</p>
<p>If the file of source entries have another values after working ofÂ closure compiler one can justÂ make text replacement to modifyÂ <strong>jquery.jqGrid.min.map</strong>.</p>
<p>I'm not good in gradle but extending ofÂ doLast {...} ofÂ jqgrid-min task to the following work.</p>
<div class="sfcode">
<pre class="brush-javascript syntax">task 'jqgrid-min'(dependsOn: 'jqgrid') {
    description = "MinimizeÂ ..."

    <strong>def outputFile = new File(distdir, 'jquery.jqGrid.min.map')</strong>

    inputs.file jqGridFile
    outputs.file jqGridMinFile
    doLast {
        ant.taskdef(name: 'jscompile', ...
        ant.jscompile(
        ...
        }
        <strong>def fileContent = jqGridSrcMapFile.getText()
        fileContent = fileContent.replace('"sources":["dist/jquery.jqGrid.js"],', '"sources":["jquery.jqGrid.src.js"],')
        replace('"file":"jquery.jqGrid.map.js",', '"file":"jquery.jqGrid.min.js",')
        outputFile.write(fileContent)</strong>
    }
}</pre></div><p>It doesn't matter how exactlyÂ <strong>jquery.jqGrid.min.js</strong>Â andÂ <strong>jquery.jqGrid.min.map</strong>Â will be patched. it's just important that the described above entries are exist.</p>
<p>As an example one can try to debugÂ in Google Chrome <a href="http://www.ok-soft-gmbh.com/jqGrid/jquery.jqGrid-4.7.0/dist/FontAwesome4_Bootstrap3_2__.htm" target="_blank">the demo</a>, which usesÂ <strong>jquery.jqGrid.min.js</strong> andÂ <strong>jquery-1.11.1.min.js</strong>. One will sees the source code ofÂ <strong>jquery.jqGrid.src.js</strong> andÂ <strong>jquery-1.11.1.js</strong> instead.</p>
<p>It's clear that sourceÂ mapping is not perfect.Â The names ofÂ compiled/compressed variable will be not mapped to theÂ names fromÂ the original source. Nevertheless it would be helpful to haveÂ <strong>jquery.jqGrid.min.map</strong>Â file which corresponds <strong>jquery.jqGrid.src.js</strong>Â to included in <strong>jquery.jqGrid-4.7.0.zip</strong>. Even without "//@ sourceMappingURL=..." line and without patched it <strong>jquery.jqGrid.min.map</strong>Â have some value for the users (like jQuery do this. jquery-1.11.1.min.js have no "//@ sourceMappingURL=..." statement, but jquery-1.11.1.min.map can be still used to make the reference to jquery-1.11.1.js). The users could makes the required modifications yourself if it will be difficult to automate the building process. One needs just to have <strong>jquery.jqGrid.min.map</strong>Â file which corresponds <strong>jquery.jqGrid.min.js</strong>Â and <strong>jquery.jqGrid.src.js</strong>.Â </p>
<p>Best regards<br />
 Oleg</p>
<p>P.S. It would be helpful to publish the new 4.7.0 version of jqGrid on well known public places:Â <a href="https://www.nuget.org/packages/Trirand.jqGrid/" target="_blank">nuget</a>,Â <a href="http://plugins.jquery.com/jqGrid/" target="_blank">the jQuery plugin registry</a>,Â <a href="https://cdnjs.com/libraries/jqgrid" target="_blank">CDNJS CDN</a>,Â <a href="http://www.jsdelivr.com/#!jqgrid" target="_blank">jsDelivr CDN</a>Â and other.</p>
]]></description>
        	        	<pubDate>Tue, 09 Dec 2014 01:15:14 +0200</pubDate>
        </item>
        <item>
        	<title>OlegK on generate jquery.jqGrid.map.js in the next release of jqGrid</title>
        	<link>http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid#p31403</link>
        	<category>Releases</category>
        	<guid isPermaLink="true">http://www.trirand.com/blog/?page_id=393/releases/generate-jquery-jqgrid-map-js-in-the-next-release-of-jqgrid#p31403</guid>
        	        	<description><![CDATA[<p>Hello Tony,</p>
<p>I hope that you'll soon publish new version of jqGrid. It would be very good if it would includesÂ <em>jquery.jqGrid.map.js</em> together withÂ <em>jquery.jqGrid.min.js</em>. I makes some tests and suggest you to make small changes inÂ <em>build.gradle</em> file which generates the map file. One needs firstÂ modify the line</p>
<p>Â  Â Â jscompiler 'com.google.javascript:closure-compiler:<span class="x x-first x-last">r1810</span>'</p>
<p>to</p>
<p>Â  Â  jscompiler 'com.google.javascript:closure-compiler:<strong><span class="x x-first x-last">v20141023</span></strong>'</p>
<p>to include the line</p>
<p>Â  Â Â <strong>def jqGridSrcMapFile = new File(distdir, 'jquery.jqGrid.map.js')</strong></p>
<p>and to modify the line</p>
<p>Â  Â Â ant.jscompile(output: jqGridMinFile, warning: 'QUIET', debug: logger.debugEnabled) {</p>
<p>to the line</p>
<p>Â  Â Â ant.jscompile(output: jqGridMinFile, warning: 'QUIET', <span class="x x-first x-last"><strong>sourceMapFormat: 'V3', sourceMapOutputFile: jqGridSrcMapFile</strong>, </span>debug: logger.debugEnabled) {</p>
<p>I included the modification (see <a href="https://github.com/OlegKi/jqGrid/commit/d7095b371dfe5c4f6b64bffb238420b5ac88b011" target="_blank">here</a>) in <a href="https://github.com/tonytomov/jqGrid/pull/654" target="_blank">the pending pull request</a>. Additional advantage of updating to the new version ofÂ closure-compiler is the <strong>reducing the size</strong> ofÂ <em>jquery.jqGrid.min.js</em> file.</p>
<p>I recommend additionally to upgradeÂ gradle/wrapper used in the build fromÂ <em>gradle-1.0-milestone-8a-bin</em> to the currentÂ <em>gradle-2.2-bin</em>.</p>
<p>Best regards<br />
 Oleg</p>
]]></description>
        	        	<pubDate>Sat, 22 Nov 2014 19:07:24 +0200</pubDate>
        </item>
</channel>
</rss>