[問題] 一個專案裡面,夾雜了不同版本的jquery !

看板Web_Design作者 (海納百川)時間8年前 (2017/01/07 03:14), 8年前編輯推噓13(1309)
留言22則, 17人參與, 最新討論串1/1
小弟最近接手一個php專案,感覺架構頗亂!! 其中一項 jquery , Serach 結果: ./css/jquery.ui.all.css ./js/jquery-1.8.2.min.js ./js/jquery-ui.custom.js ./js/jquery.form.js ./js/jquery.query.js ./assets/css/less/thirdparty-jquery-ui.less ./assets/js/chosen.jquery.min.js ./assets/js/jquery.pwstrength.js ./components/jquery/dist/jquery.js ./components/jquery/dist/jquery.min.js ./components/jquery/dist/jquery.slim.js ./components/jquery/dist/jquery.slim.min.js ./components/jquery/src/jquery.js ./components/jquery.1x/dist/jquery.js ./components/jquery.1x/dist/jquery.min.js ./components/jquery.1x/dist/jquery.slim.js ./components/jquery.1x/dist/jquery.slim.min.js ./components/jquery.1x/src/jquery.js ./components/_mod/bootstrap-duallistbox/jquery.bootstrap-duallistbox.js ./components/_mod/bootstrap-duallistbox/jquery.bootstrap-duallistbox.min.js ./components/_mod/datatables/jquery.dataTables.bootstrap.js ./components/_mod/datatables/jquery.dataTables.bootstrap.min.js ./components/_mod/easypiechart/jquery.easypiechart.js ./components/_mod/easypiechart/jquery.easypiechart.min.js ./components/_mod/jquery-ui/jquery-ui.css ./components/_mod/jquery-ui/jquery-ui.min.css ./components/_mod/jquery-ui.custom/jquery-ui.custom.css ./components/_mod/jquery-ui.custom/jquery-ui.custom.js ./components/_mod/jquery-ui.custom/jquery-ui.custom.min.css ./components/_mod/jquery-ui.custom/jquery-ui.custom.min.js ./components/_mod/jquery.mobile.custom/jquery.mobile.custom.js ./components/_mod/jquery.mobile.custom/jquery.mobile.custom.min.js ./components/_mod/jquery.nestable/jquery.nestable.js ./components/_mod/jquery.nestable/jquery.nestable.min.js ./system/libraries/javascript/Jquery.php 裡面版本有: 1.8.2, 2.2.1, v3.0.0-beta1, v1.12.1, .... 到底是什麼原因造成這麼亂 Orz 我想把它整合只留最新版本,請問這樣會有相容性問題嗎? 囧.. -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 1.171.249.35 ※ 文章網址: https://www.ptt.cc/bbs/Web_Design/M.1483730045.A.EC0.html

01/07 07:56, , 1F
不要接 你會哭的
01/07 07:56, 1F

01/07 09:43, , 2F
很大的機率會
01/07 09:43, 2F

01/07 10:36, , 3F
不變應萬變
01/07 10:36, 3F

01/07 13:52, , 4F
這是歷史文件吧,能學到歷史喔!
01/07 13:52, 4F

01/07 14:09, , 5F
一次更新會很刺激
01/07 14:09, 5F

01/07 14:46, , 6F
噗,為啥jquery有php版的XD
01/07 14:46, 6F

01/07 14:48, , 7F
理論上 1.x 與 3 能各自更新,但要先確定沒有神人擅改過
01/07 14:48, 7F

01/07 15:42, , 8F
你再弄一個新的進去 你寫的程式都引用這個新的
01/07 15:42, 8F

01/07 18:25, , 9F
因為以前那個人故意要搞你
01/07 18:25, 9F

01/07 19:41, , 10F
可以想像其他的程式碼可能也是… 你多保重…
01/07 19:41, 10F
※ 編輯: newversion (1.171.248.101), 01/07/2017 19:49:25

01/07 22:00, , 11F
感覺光是 refactoring 就會弄很久的樣子 @@~
01/07 22:00, 11F

01/07 23:14, , 12F
個人的經驗最穩的是1.8.3先留這個版本再看有沒有問題
01/07 23:14, 12F

01/07 23:15, , 13F
不過通常還是可以用新版的,加個 migrate 會安心些
01/07 23:15, 13F

01/07 23:16, , 14F
通常我是判斷IE用1.8.3,其他的就1.11以後+migrate
01/07 23:16, 14F

01/11 16:06, , 15F
肯定衝突、真心不騙
01/11 16:06, 15F

01/15 15:58, , 16F
這什麼鬼東西
01/15 15:58, 16F

01/18 08:32, , 17F
那個Jquery.php該不會是webshell吧...
01/18 08:32, 17F

01/24 15:20, , 18F
如果是不同版本
01/24 15:20, 18F

01/24 15:20, , 19F
jQ會很衝不是嗎
01/24 15:20, 19F

01/24 16:03, , 20F
海納百川 GO
01/24 16:03, 20F

02/12 18:56, , 21F
可以用 bower 來管理你的套件,並且他會幫你檢查相容性
02/12 18:56, 21F

02/12 18:56, , 22F
02/12 18:56, 22F
文章代碼(AID): #1OR-nzx0 (Web_Design)
文章代碼(AID): #1OR-nzx0 (Web_Design)