bmatzner / underscore-bundle
此包已被 废弃 且不再维护。未建议替代包。
Underscore.js 适用于 Symfony2 的包
1.8.3
2017-01-09 09:04 UTC
Requires
- symfony/framework-bundle: >=2.1
This package is not auto-updated.
Last update: 2020-01-24 15:01:26 UTC
README
当前版本
Underscore.js v1.8.3
安装
将包添加到您的 composer.json 文件中
// composer.json { "require": { // ... "bmatzner/underscore-bundle": "~1.8" } }
将包添加到您的应用内核中
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new Bmatzner\UnderscoreBundle\BmatznerUnderscoreBundle(), // ... ); }
使用 Composer 下载包
$ php composer.phar update bmatzner/underscore-bundle
安装资源
假设您的服务器公共目录命名为 "web",安装公共供应商资源
$ php app/console assets:install web
可选地,使用 --symlink 属性创建链接而不是资源的副本
$ php app/console assets:install --symlink web
用法
在您的 HTML 模板中引用所需的文件,例如。
<script type="text/javascript" src="{{ asset('bundles/bmatznerunderscore/js/underscore.min.js') }}"></script>
许可证
有关许可证信息,请参阅包含文件的源代码。