add customerapi + customer auth
This commit is contained in:
30
customerapi/assets/AppAsset.php
Normal file
30
customerapi/assets/AppAsset.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* @link http://www.yiiframework.com/
|
||||
* @copyright Copyright (c) 2008 Yii Software LLC
|
||||
* @license http://www.yiiframework.com/license/
|
||||
*/
|
||||
|
||||
namespace customerapi\assets;
|
||||
|
||||
use yii\web\AssetBundle;
|
||||
|
||||
/**
|
||||
* @author Qiang Xue <qiang.xue@gmail.com>
|
||||
* @since 2.0
|
||||
*/
|
||||
class AppAsset extends AssetBundle
|
||||
{
|
||||
public $basePath = '@webroot';
|
||||
public $baseUrl = '@web';
|
||||
public $css = [
|
||||
'css/site.css',
|
||||
];
|
||||
public $js = [
|
||||
'js/app.js',
|
||||
];
|
||||
public $depends = [
|
||||
'yii\web\YiiAsset',
|
||||
'yii\bootstrap\BootstrapAsset',
|
||||
];
|
||||
}
|
||||
37
customerapi/assets/config-assets.php
Normal file
37
customerapi/assets/config-assets.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
/**
|
||||
* Configuration file for the "yii asset" console command.
|
||||
* Note that in the console environment, some path aliases like '@webroot' and '@web' may not exist.
|
||||
* Please define these missing path aliases.
|
||||
*/
|
||||
Yii::setAlias('@webroot', realpath(__DIR__ . '/../web'));
|
||||
Yii::setAlias('@web', '/');
|
||||
return [
|
||||
// Adjust command/callback for JavaScript files compressing:
|
||||
'jsCompressor' => 'java -jar compiler.jar --js {from} --js_output_file {to} --warning_level QUIET',
|
||||
// Adjust command/callback for CSS files compressing:
|
||||
'cssCompressor' => 'java -jar yuicompressor.jar --type css {from} -o {to}',
|
||||
// The list of asset bundles to compress:
|
||||
'bundles' => [
|
||||
'customerapi\assets\AppAsset',
|
||||
'yii\web\YiiAsset',
|
||||
'yii\web\JqueryAsset',
|
||||
'yii\bootstrap\BootstrapAsset',
|
||||
'yii\bootstrap\BootstrapPluginAsset'
|
||||
],
|
||||
// Asset bundle for compression output:
|
||||
'targets' => [
|
||||
'allCustomerapi' => [
|
||||
'class' => 'customerapi\assets\MyAsset' ,
|
||||
'basePath' => '@webroot/assets',
|
||||
'baseUrl' => '@web/assets',
|
||||
'js' => 'js/all-{hash}.js',
|
||||
'css' => 'css/all-{hash}.css',
|
||||
],
|
||||
],
|
||||
// Asset manager configuration:
|
||||
'assetManager' => [
|
||||
'basePath' => '@webroot/assets',
|
||||
'baseUrl' => '@web/assets',
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user