superup / mobwebbundle
Superup项目的移动网页包
1.1.1
2017-06-15 13:26 UTC
This package is not auto-updated.
Last update: 2024-09-29 02:52:25 UTC
README
步骤 1:下载包
打开命令行,进入您的项目目录并执行以下命令以下载此包的最新稳定版本
$ composer require superup/mobwebbundle
或者您可以使用最新开发版本
$ composer require superup/mobwebbundle:@dev
此命令要求您全局安装Composer,请参阅Composer文档中的安装章节。
步骤 2:启用包
然后,通过将其添加到项目app/AppKernel.php
文件中注册的包列表来启用包
<?php // app/AppKernel.php // ... class AppKernel extends Kernel { public function registerBundles() { $bundles = array( // ... new Superup\MobWebBundle\SuperupMobWebBundle() ); // ... } // ... }
步骤 3:手动安装资源(如果需要)
假设您的服务器公共目录命名为"web",安装公共供应商资源
$ ./bin/console assets:install web
可选地,使用 --symlink 属性创建资源的链接而不是复制
$ ./bin/console assets:install --symlink web
步骤 4:使用方法
在您的HTML模板中参考所需的文件,例如。
<script type="text/javascript" src="{{ asset('bundles/superupmobweb/lodash/lodash.min.js') }}"></script>