Skip to content

Commit

Permalink
添加CSS,JS代码压缩
Browse files Browse the repository at this point in the history
  • Loading branch information
shi-yang committed Jan 19, 2016
1 parent cbfb939 commit e7310e1
Show file tree
Hide file tree
Showing 159 changed files with 20,817 additions and 19 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"shiyang/yii2-infinite-scroll": "*",
"shiyang/yii2-masonry": "*",
"justinvoelker/yii2-tagging": "*",
"shiyang/yii2-umeditor": "^1.0"
"shiyang/yii2-umeditor": "^1.0",
"skeeks/yii2-assets-auto-compress": "*"
},
"require-dev": {
"yiisoft/yii2-codeception": "*",
Expand Down
194 changes: 191 additions & 3 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 11 additions & 1 deletion frontend/config/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@
return [
'id' => 'app-frontend',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'bootstrap' => [
'log',
'assetsAutoCompress'
],
'controllerNamespace' => 'frontend\controllers',
'defaultRoute' => 'user/dashboard',
'modules' => [
Expand Down Expand Up @@ -39,6 +42,13 @@
],
'components' => [
'db' => $db,
'assetsAutoCompress' => [
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
'enabled' => true,
'jsCompress' => true,
'cssFileCompile' => true,
'jsFileCompile' => true,
],
'urlManager' => [
'enablePrettyUrl' => true,
'rules' => [
Expand Down
8 changes: 4 additions & 4 deletions vendor/composer/ClassLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
namespace Composer\Autoload;

/**
* ClassLoader implements a PSR-0, PSR-4 and classmap class loader.
* ClassLoader implements a PSR-0 class loader
*
* See https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-0.md
*
* $loader = new \Composer\Autoload\ClassLoader();
*
Expand All @@ -37,8 +39,6 @@
*
* @author Fabien Potencier <[email protected]>
* @author Jordi Boggiano <[email protected]>
* @see http://www.php-fig.org/psr/psr-0/
* @see http://www.php-fig.org/psr/psr-4/
*/
class ClassLoader
{
Expand Down Expand Up @@ -147,7 +147,7 @@ public function add($prefix, $paths, $prepend = false)
* appending or prepending to the ones previously set for this namespace.
*
* @param string $prefix The prefix/namespace, with trailing '\\'
* @param array|string $paths The PSR-4 base directories
* @param array|string $paths The PSR-0 base directories
* @param bool $prepend Whether to prepend the directories
*
* @throws \InvalidArgumentException
Expand Down
Loading

0 comments on commit e7310e1

Please sign in to comment.