.gitignore for 1.9 Eliminates Minnified Version!

.gitignore for 1.9 Eliminates Minnified Version!

machineghostmachineghost Posts: 9Questions: 0Answers: 0
edited March 2012 in Bug reports
Imagine you want to use the latest version of data tables. You download it, plop it in to your Git repository, commit, and think you're done. Maybe you even test with the development version of the JS file; everything looks good.

Then you go to deploy to your production server, only to find that for no obvious reason data tables (which worked fine in development) don't work in production. After a lot of panicking/scrambling you finally find the problem: there is no jquery.dataTables.min.js on your production server!

Then you figure out why (after maybe half an hour of research, because you totally don't expect this): there's a .gitignore file that comes with data tables, and it specifically says to ignore the min file!

Now I can understand why the data table developers would want to avoid checking in min files, as they are essentially compiled files, but PLEASE, when you are distributing a library do not hide files from your users' repositories! Please either remove that line from the .gitignore file OR (better yet) just don't distribute the .gitignore file. If your users are using Git, they almost certainly have their own .gitignore and don't need your's, and if they aren't using git then they don't need the file at all.

Replies

  • allanallan Posts: 63,689Questions: 1Answers: 10,500 Site admin
    My .gitignore file ignores the min file because it is a generated file and thus I don't need it in version control, since it can be recreated at any other point.

    That explains why it is there, but it doesn't explain the .gitignore file being in the zip distribution file which it most certainly should not be! My apologies for that. I've just modified my build scripts to remove it from future versions of DataTables (which will start with 1.9.1 which should be out next week).

    Thanks very much for letting me know!

    Allan
This discussion has been closed.