yii2-netdisk/config/console.php
Ricardo Pérez 8d04158f16
Add @bower and @npm aliases in config/console.php
You need them if you add the `yii\apidoc\commands\ApiController` and `GuideController` to your console application command map and you run them inside of your applications console app, as said in the yiisoft/yii2-apidoc 's README.md:

https://github.com/yiisoft/yii2-apidoc/blob/master/README.md
2017-11-07 13:29:58 +01:00

48 lines
1.1 KiB
PHP

<?php
$params = require __DIR__ . '/params.php';
$db = require __DIR__ . '/db.php';
$config = [
'id' => 'basic-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'app\commands',
'aliases' => [
'@bower' => '@vendor/bower-asset',
'@npm' => '@vendor/npm-asset',
],
'components' => [
'cache' => [
'class' => 'yii\caching\FileCache',
],
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'db' => $db,
],
'params' => $params,
/*
'controllerMap' => [
'fixture' => [ // Fixture generation command line.
'class' => 'yii\faker\FixtureController',
],
],
*/
];
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
}
return $config;