How to minify again dataTables

How to minify again dataTables

imacimac Posts: 19Questions: 0Answers: 0
edited April 2013 in General
I would like to fix a bug as Allen told me and for that I would need to correct it in the non minified version and then minify it again.

I was wondering which method should I use to minify the resulting code to be reduced in the same was as the original. I don't know if there are better or worse methods to do it, so I would rather prefer to use the same one.

Thanks.

Replies

  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Ideally use the 'build.sh' script in the 'scripts' directory. You might need to alter some of the paths to point to a local copy of JSHint and Closure Compiler though.

    Allan
  • imacimac Posts: 19Questions: 0Answers: 0
    I am using windows. Isn't there any other way? http://www.jshint.com/ maybe?
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    Fundamentally you just need to combine the scripts in the `src` directory. The build.sh script will do that for you, but is you don't have bash (you could use cygwin) you'd need to write a Windows shell script for it, or do it manually and then run Closure Compiler over it.

    Allan
  • imacimac Posts: 19Questions: 0Answers: 0
    edited April 2013
    Thanks Allan, but I wonder.

    Can't I just make use of media/jquery.dataTables.js (not the .min file), modity the needed function and then, make use of the online Closure Compiler?

    http://closure-compiler.appspot.com/home

    Wouldn't it be exactly the same as the procedure you talk about?

    The only question I have is, which mode of compression should I use? Whitespace only, simple or advanced.

    Thanks.
  • allanallan Posts: 63,522Questions: 1Answers: 10,473 Site admin
    > Can't I just make use of media/jquery.dataTables.js (not the .min file), modity the needed function and then, make use of the online Closure Compiler?

    Of course you can :-). I don't accept patches with changes only to the built file, but you are free to modify it as you wish, as per the license.

    > The only question I have is, which mode of compression should I use? Whitespace only, simple or advanced.

    Up to you. I use simple.

    Allan
  • imacimac Posts: 19Questions: 0Answers: 0
    Thanks again Allan! :) I have it working now.
This discussion has been closed.