前端 - 压缩的 JS 修改后产生的 diff 数据大么, 压缩的 JS 是否合适放在 repo?
大家讲道理
大家讲道理 2017-04-22 09:00:19
0
2
786

请教下熟悉 diff 算法的同学, 我场景是连接 Git 服务器速度不是很快,
现在有考虑在本地完成 JS 代码压缩, 然后再部署到服务器上.
那么如果我的 JS 压缩代码只有一行, 当文件发生改变, diff 产生的数据量大不大?

另外 JS 压缩后代码是否放在 repo 里, 这个是怎么考虑的?

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(2)
大家讲道理

If you are concerned about the amount of data, don’t put it in. This has little to do with the diff algorithm and has a lot to do with git's pack and transmission. Reference: http://git-scm.com/book/zh/Git-%E5%86%85%E9%83%A8%E5%8E%9F%E7%90%86-Packfiles

In addition, I don’t know if the results of minifying your JS source code multiple times using the tool you are using are similar.

洪涛

I don’t really understand, but it seems to be quite big

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template