Author Topic: How source code of PQ Grid being minimized?  (Read 1875 times)

Feng Dihai

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 2
    • View Profile
How source code of PQ Grid being minimized?
« on: February 03, 2017, 09:02:23 am »
We have patched pqgrid.dev.js to improve user experience. According to the commercial license, it is required to be minimized to before releasing to end users. We plan to use Uglifyjs2 to do the job, but encountering several warnings when compressing, such as:
  • side effects in initialization of unused variable
  • non-strict equality against boolean: == false or true
  • drop unreacheable codes/unused variables

How pqgrid.dev.min.js being minimized (Google Closure compiler/YUI/any others)? Does warnings above corrupt PQ Grid?
Thank you. 

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6263
    • View Profile
Re: How source code of PQ Grid being minimized?
« Reply #1 on: February 03, 2017, 09:26:35 am »
It's minimized with Google closure. Warnings don't corrupt.

The recommended way to patch is to write separate files to override the specific methods of pqGrid. For example if you wish to override some method "method1" of pqGrid, then use a separate file to write

Code: [Select]
(function($){
  $.paramquery.pqGrid.prototype.method1 = function( params){
     //new functionality here.
  };
})(jQuery);


BTW which methods/functionality have you patched? You may post them ( the outline ) in "suggest new features" board, they might be included in pqgrid core if found useful.
« Last Edit: February 03, 2017, 09:42:09 am by paramquery »

Feng Dihai

  • Pro Ultimate
  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: How source code of PQ Grid being minimized?
« Reply #2 on: February 13, 2017, 07:13:03 am »
I plan to submit our patches later.

Thank you for your wonderful work.