bmatzner / jquery-bundle
该包已被弃用且不再维护。没有推荐替代包。
jQuery Bundle for Symfony2
2.2.2
2016-03-26 19:51 UTC
Requires
- symfony/framework-bundle: >=2.1
README
当前版本
jQuery 1.12.2 jQuery Migrate Plugin 1.2.1
安装
将包添加到 composer.json 文件中
将包的版本设置为对应的 jQuery 版本。为支持 IE6/7/8,使用 master 分支,2.x 分支包含较轻量级的 2.x 分支。
// composer.json { "require": { // ... "bmatzner/jquery-bundle": "~1.12" } }
将包添加到应用程序内核
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Bmatzner\JQueryBundle\BmatznerJQueryBundle(), // ... ); }
使用 Composer 下载包
$ php composer.phar update bmatzner/jquery-bundle
安装资源
假设您的服务器公共目录名为 "web",安装公共供应商资源
$ php app/console assets:install web
可选地,使用 --symlink 属性创建链接而不是资源副本
$ php app/console assets:install --symlink web
使用方法
在您的 HTML 模板中引用所需文件,例如
<script type="text/javascript" src="{{ asset('bundles/bmatznerjquery/js/jquery.min.js') }}"></script>
许可证
有关许可证信息,请参阅包含文件的源代码