admin管理员组文章数量:1332339
I e from a C# background and have moved into Javascript development. In the C# world, I would never consider mitting an executable (.DLL, .EXE) into source control because you cannot verify that the executable matches the code. However I see plenty of examples of github repositories that contain a .js next to a .min.js file and I see it as a similar smell.
Is it helpful to third parties using your library or should any minifying be handled by them - such as in the use case that a library is developed in coffeescript. Are there any best practices here?
I e from a C# background and have moved into Javascript development. In the C# world, I would never consider mitting an executable (.DLL, .EXE) into source control because you cannot verify that the executable matches the code. However I see plenty of examples of github repositories that contain a .js next to a .min.js file and I see it as a similar smell.
Is it helpful to third parties using your library or should any minifying be handled by them - such as in the use case that a library is developed in coffeescript. Are there any best practices here?
Share Improve this question edited Mar 4 at 13:45 Luke Girvin 13.5k10 gold badges67 silver badges85 bronze badges asked Oct 24, 2013 at 12:18 Mr WildeMr Wilde 6599 silver badges19 bronze badges2 Answers
Reset to default 4If your repository shippes a way to minify, don't add it. So if you are writing a minifier for js code, you don't have to submit the minified versions of your js code, as each person who clones or forks your repo should be able to generate their own minified files.
If your repo does not include a program/script/whatever to minify the js files, include them.
Disclaimer: This is my opinion and seems to be the most logical answer on this question for me!
Minified files should not be under source control for the simple reason that they are not 'source' files. If you need to fix a bug in your javascript you don't do it in the minified file so why have it under source control.
本文标签: javascriptShould minified files be committed into source controlStack Overflow
版权声明:本文标题:javascript - Should minified files be committed into source control? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742329718a2454444.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论