Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Minifying jqGrid from GitHub
22/06/2009
19:05
Avatar
JamesKovacs
Calgary, Alberta, Canada
Member
Members
Forum Posts: 8
Member Since:
01/06/2009
sp_UserOfflineSmall Offline

Can you provide the minification script used to produce downloads for jqGrid 3.5? Right now the download page produces a zip of the minified files for jqGrid 3.5 Beta (build5), but I need some of the recent fixes that are only in GitHub. (We're just adding features that require tree grids.) I would like an easy way of producing minified files from GitHub so that I can easily track fixes. I would rather not have to swap between the loader and minified versions as fixes are released to GitHub and eventually the download page.

BTW - I tried YUI Compressor, but it fails on jquery.searchFilter.js with two illegal character and one syntax error. I'd rather not create a custom version of this file that is ammenable to minification.

Thanks, James

23/06/2009
02:24
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

Will see what I can do. The download manager is in php with a lot of modules that should be enabled.

Also I build jqGrid with YUI Compressor. In order to compress correct you should set a parameter --charset=utf-8 to the comand line of every module - i.e

java -jar yuicompressor-2.4.2.jar "grid.base.js" --charset=utf-8 -o "min\\grid.base.js"

Hope this will help

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

23/06/2009
11:45
Avatar
JamesKovacs
Calgary, Alberta, Canada
Member
Members
Forum Posts: 8
Member Since:
01/06/2009
sp_UserOfflineSmall Offline

Thanks for the quick reply, Tony. The UTF-8 flag fixed the errors. YUI Compressor should be sufficient to create minified builds for the project. No need to worry about the PHP version unless someone else needs it. For reference, here is the PowerShell command line that I'm using to compress and combine all of the JS files into a single jquery.jqGrid.min.js file:

ls .\\jqGrid\\js\\*.js | foreach { java -jar .\\yuicompressor-2.4.2.jar $_.FullName –charset utf-8 >> min\\jquery.jqGrid.min.js }

Thanks again.

23/11/2012
14:48
Avatar
Seb33300
France
Member
Members
Forum Posts: 6
Member Since:
13/09/2012
sp_UserOfflineSmall Offline

Hello,

Any way to easily minify jqgrid from github on windows ?

23/11/2012
16:26
Avatar
OlegK
Germany
Member
Members
Forum Posts: 1255
Member Since:
10/08/2009
sp_UserOfflineSmall Offline

Hello,

in my opinion it would be gut to ask Tony to create more frequently minor jqGrid releases. For example one could create 4.4.2 now.

If you need to create jquery.jqGrid.min.js yourself you can do the following: If you would open jquery.jqGrid.min.js you will find the comment started with "* Modules:" directly at the beginning of the file. After the text "* Modules:" you will see

grid.base.js; jquery.fmatter.js; grid.custom.js; grid.common.js; grid.formedit.js; grid.filter.js; grid.inlinedit.js; grid.celledit.js; jqModal.js; jqDnR.js; grid.subgrid.js; grid.grouping.js; grid.treegrid.js; grid.import.js; JsonXml.js; grid.tbltogrid.js; grid.jqueryui.js;

It's the full list of modules of jqGrid included in the file jquery.jqGrid.min.js. You can concatinate the files from github in exactly the same order to create your version of jquery.jqGrid.src.js file.

Now you can use any minifier which you like to produce the resulting jquery.jqGrid.min.js. For example you can download  Microsoft Ajax Minifier. To create jquery.jqGrid.min.js you can use

AjaxMin.exe -enc:in utf-8 jquery.jqGrid.src.js -o jquery.jqGrid.min.js

If you want you can produce minimize version of grid.locale-XX.js files in the same way. Because the files contains Unicode characters you need use additional option -enc:out utf-8 to have correctly encoded results.

AjaxMin.exe -enc:in utf-8 -enc:out utf-8 grid.locale-de.js -o grid.locale-de.min.js

You can use the same option to create jquery.jqGrid.min.js too.

If you use some plugins from plugins subdirectory you can create minified version of the files too.

Advantage of AjaxMin.exe is that it can be used not only for minification of JS files, but for minification of CSS files too. For example I use ui.jqgrid.min.css in release version of my projects created with

AjaxMin.exe ui.jqgrid.css -o ui.jqgrid.min.css

Best regards
Oleg

P.S. By the way the jquery.jqGrid.min.js created with respect of AjaxMin.exe is a little smaller as the original jquery.jqGrid.min.js.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
31 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information