alexandermatveev / backbone-bundle
Backbone.js Bundle for Symfony2
1.2
2016-06-02 15:14 UTC
Requires
- php: >=5.3.0
Requires (Dev)
- symfony/console: ~2.1
- symfony/framework-bundle: ~2.1
- symfony/yaml: ~2.1
This package is auto-updated.
Last update: 2024-09-09 20:24:59 UTC
README
当前版本
Backbone.js 1.3.3
Underscore.js 1.8.3
安装
将包添加到你的composer.json文件中
// composer.json { "require": { // ... "alexandermatveev/backbone-bundle": "*" } }
将包添加到你的应用程序内核中
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new AlexanderMatveev\BackboneBundle\AlexanderMatveevBackboneBundle(), // ... ); }
使用Composer下载包
$ php composer.phar update alexandermatveev/backbone-bundle
安装资源
假设你的服务器公共目录命名为"web",安装公共供应商资源
$ bin/console assets:install web
可选地,使用--symlink属性创建链接而不是资源的副本
$ bin/console assets:install --symlink web
用法
在HTML模板中引用所需文件,例如
<script type="text/javascript" src="{{ asset('bundles/alexandermatveevbackbone/js/underscore-min.js') }}"></script> <script type="text/javascript" src="{{ asset('bundles/alexandermatveevbackbone/js/backbone-min.js') }}"></script>
许可证
请参阅包含文件的源代码以获取许可证信息