Skip to content
This repository has been archived by the owner on Jan 1, 2020. It is now read-only.

Not all jqGrid file are included in the build #29

Closed
OlegKi opened this issue Jan 11, 2015 · 5 comments
Closed

Not all jqGrid file are included in the build #29

OlegKi opened this issue Jan 11, 2015 · 5 comments

Comments

@OlegKi
Copy link
Contributor

OlegKi commented Jan 11, 2015

Hi,

I do made some changes in my repository to reduce the size of resulting jquery.jqGrid.min.js. I don't planned to do to make such changes before, but the results was too good: i could reduce the size of jquery.jqGrid.min.js by the last changes from 282 KB (289.272 bytes) till 275 KB (282.532 bytes) in the current version.

After that I compared the size of grid.js-4.7.0.min.js and grid.js-4.7.0.js with the size of jquery.jqGrid.min.js and jquery.jqGrid.src.js from my repository. Your jquery.jqGrid.min.js is smaller. After some additional analyse I've found out that the current build of grid.js-4.7.0.min.js and grid.js-4.7.0.js don't includes the files which you moved in external folder:

jqDnR.js
jqModal.js
jquery.fmatter.js
JsonXml.js

It's a clear bug in the build process which need be fixed.

Best regards
Oleg

@flack flack closed this as completed in ec6a0ad Jan 11, 2015
@flack
Copy link
Contributor

flack commented Jan 11, 2015

Thanks for the report! Should be fixed now.

@OlegKi
Copy link
Contributor Author

OlegKi commented Jan 11, 2015

One small additional remark. I understand many advantages of building process which uses Grunt. Nevertheless I tried to test only one thing: the size of the final file jquery.jqGrid.min.js (or grid.js-4.7.0.min.js) in your case because I use Closure Compiler in my fork of jqGrid and you use Uglify.

If I compile the current jquery.jqGrid.src.js from my my repository with respect of Closure Compiler I get jquery.jqGrid.min.js of the size 275 KB (282.532 bytes), but if I compile the same file using Uglify I get minimized file of the size 277 KB (284.619 bytes). So the usage of Closure Compiler seems be the best choice if one take in the consideration the final results.

Best regards
Oleg
P.S. During making of the experiments I've found a small bug in the current build file. I had to execute explicitly grunt concat --force --verbose. It seems that there are not declared dependency from the task "concat" in the build process.You can try to delete the file build\grid.js-4.7.0.js and you will see that no new build\grid.js-4.7.0.js file and no dist\grid.js-4.7.0.min.js will be created.

@flack
Copy link
Contributor

flack commented Jan 11, 2015

@OlegKi I just tested grunt concat like you described, but for me, it works normally:

$ grunt clean:build
Running "clean:build" (clean) task
>> 1 path cleaned.

Done, without errors.

$ grunt concat
Running "concat:compile_css" (concat) task
File dist/grid.js-4.7.0.min.css created.

Running "concat:compile_js" (concat) task
File build/grid.js-4.7.0.js created.

Done, without errors.

Could you post the error message you are getting?

@flack
Copy link
Contributor

flack commented Jan 11, 2015

About the compiler: If you look a bit at benchmarks, it seems that Closure Compiler compresses a little bit better, and runs approx. ten times slower than Uglify. Since the compile task is not run during grunt watch, the performance penality will not apply, i.e. for development, there would be no difference. For compile, the runtime of the task is not so important, so I guess we can switch back to Closure Compiler. I've found this package:

https://github.com/thanpolas/grunt-closure-tools

which seems to provide all the configuration we need. I'll open a new ticket for the change

@OlegKi
Copy link
Contributor Author

OlegKi commented Jan 11, 2015

The difference that you executed $ grunt clean:build and I used grunt --force --verbose corresponds to the information from README.md. Probably my experiments were not so clean, but I wanted just inform you about. I didn't execute clean task explicitly or concat task. I make experiments on the repository which I loaded before and where I made some experiments. In any way I had the repository where build directory with many files inside exists. After some strange effects I could see that grid.js-4.7.0.js was not regenerated during executing grunt --force. I deleted the file grid.js-4.7.0.js and had successful build without any dist\grid.js-4.7.0.min.js.

In any way I can't reproduce the problems now. Either the problem is soled or I have now another state of the files. So we can forget the problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants