.gitignore for 1.9 Eliminates Minnified Version!
.gitignore for 1.9 Eliminates Minnified Version!
machineghost
Posts: 9Questions: 0Answers: 0
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.
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.
This discussion has been closed.
Replies
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