我将如何安装 2 个版本的 jQuery使用凉亭?我想要 v2.0 以及 1.9.1 来支持浏览器回退
我遇到的问题是如果你跑bower install jquery#1.9.1 jquery#2.0.0
第一个版本被第二个版本覆盖,因为它们是相同的组件
根据鲍尔文档 https://github.com/bower/bower#installing-packages-and-dependencies
Bower 提供了多种安装软件包的方法:
# Using the dependencies listed in the current directory's bower.json
bower install
# Using a local or remote package
bower install <package>
# Using a specific version of a package
bower install <package>#<version>
# Using a different name and a specific version of a package
bower install <name>=<package>#<version>
您可以安装两个不同版本的 jQuery,如下所示:
bower install jquery-legacy=jquery#1.10 jquery-modern=jquery#2
或者,如果您希望将其设置为bower.json
"dependencies": {
"jquery-legacy": "jquery#1.10",
"jquery-modern": "jquery#2"
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)