alexandermatveev / moment-bundle
Symfony2 的 Moment.js Bundle
1.0
2016-09-23 10: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:44:56 UTC
README
当前版本
Moment.js 2.15.1
安装
将包添加到你的 composer.json 文件中
// composer.json { "require": { // ... "alexandermatveev/moment-bundle": "*" } }
将包添加到你的应用程序内核中
// app/AppKernel.php public function registerBundles() { $bundles = array( // ... new AlexanderMatveev\MomentBundle\AlexanderMatveevMomentBundle(), // ... ); }
使用 Composer 下载包
$ php composer.phar update alexandermatveev/moment-bundle
安装资源
假设你的服务器公共目录名为 "web",安装公共供应商资源
$ bin/console assets:install web
可选地,使用 --symlink 属性创建链接而不是资源的副本
$ bin/console assets:install --symlink web
用法
在 HTML 模板中引用所需的文件,例如
<script type="text/javascript" src="{{ asset('bundles/alexandermatveevmoment/moment.min.js') }}"></script>
或者带有地区设置
<script type="text/javascript" src="{{ asset('bundles/alexandermatveevmoment/moment-with-locales.min.js') }}"></script>
许可证
有关许可证信息,请参阅所包含文件的源代码