Skip to content

Commit 46631a7

Browse files
committed
redone configs to hidev and hisite
1 parent d2e0f0f commit 46631a7

File tree

9 files changed

+30
-85
lines changed

9 files changed

+30
-85
lines changed

Diff for: .hidev/config.yml

-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,3 @@ package:
22
type: yii2-extension
33
name: asset-packagist
44
namespace: hiqdev\assetpackagist
5-
6-
include:
7-
- .hidev/goals.yml
8-
9-
config: src/config/console.php
10-

Diff for: composer.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
},
5858
"extra": {
5959
"extension-plugin": {
60-
"hisite-config": "src/hisite-config.php"
60+
"hidev-config": "src/config/hidev.php",
61+
"hisite-config": "src/config/hisite.php"
6162
}
6263
},
6364
"repositories": [

Diff for: src/config/aliases.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
return [
4+
'@storage' => '<base-dir>/web',
5+
'@bower' => '@vendor/bower-asset',
6+
'@npm' => '@vendor/npm-asset',
7+
];

Diff for: src/config/common.php

-44
This file was deleted.

Diff for: .hidev/goals.yml renamed to src/config/goals.yml

File renamed without changes.

Diff for: src/config/console.php renamed to src/config/hidev.php

+6-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@
1010
*/
1111

1212
return [
13-
'aliases' => [
14-
'storage' => dirname(dirname(__DIR__)) . '/web',
13+
'aliases' => require __DIR__ . '/aliases.php',
14+
'params' => require __DIR__ . '/params.php',
15+
'components' => [
16+
'config' => [
17+
'include' => '@hiqdev/assetpackagist/config/goals.yml',
18+
],
1519
],
1620
];

Diff for: src/hisite-config.php renamed to src/config/hisite.php

+9-5
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@
1717
'runtimePath' => '<base-dir>/runtime',
1818
'controllerNamespace' => 'hiqdev\assetpackagist\controllers',
1919
'bootstrap' => ['log'],
20-
'aliases' => [
21-
'@storage' => '<base-dir>/web',
22-
'@npm' => '@vendor/npm-asset',
23-
'@bower' => '@vendor/bower-asset',
24-
],
2520
'components' => [
2621
'log' => [
2722
'traceLevel' => 0,
@@ -32,6 +27,15 @@
3227
],
3328
],
3429
],
30+
'cache' => [
31+
'class' => 'yii\\caching\\FileCache',
32+
],
33+
'urlManager' => [
34+
'enablePrettyUrl' => true,
35+
'showScriptName' => false,
36+
],
3537
],
3638
'modules' => [],
39+
'aliases' => require __DIR__ . '/aliases.php',
40+
'params' => require __DIR__ . '/params.php',
3741
];

Diff for: src/config/params.php

+3-10
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,7 @@
99
* @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
1010
*/
1111

12-
$params = [
13-
'logo-text' => 'Asset Packagist',
14-
'cookieValidationKey' => '345sdfsadf',
12+
return [
13+
'cookieValidationKey' => '',
14+
'debug_allowed_ips' => [],
1515
];
16-
17-
$local = __DIR__ . '/params-local.php';
18-
19-
return array_merge(
20-
$params,
21-
file_exists($local) ? require $local : []
22-
);

Diff for: src/config/web.php

+3-17
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,12 @@
11
<?php
22

3-
/*
4-
* Asset Packagist
5-
*
6-
* @link https://github.com/hiqdev/asset-packagist
7-
* @package asset-packagist
8-
* @license BSD-3-Clause
9-
* @copyright Copyright (c) 2016, HiQDev (http://hiqdev.com/)
10-
*/
11-
12-
$config = require __DIR__ . '/common.php';
13-
14-
$config['components']['urlManager'] = [
15-
'enablePrettyUrl' => true,
16-
'showScriptName' => false,
17-
];
3+
$config = require HISITE_VENDOR_DIR . '/hiqdev/hisite-config.php';
184

195
if (YII_DEBUG) {
206
$config['bootstrap']['debug'] = 'debug';
217
$config['modules']['debug'] = [
22-
'class' => 'yii\debug\Module',
23-
'allowedIPs' => isset($params['debug_allowedIPs']) ? $params['debug_allowedIPs'] : [],
8+
'class' => 'yii\debug\Module',
9+
'allowedIPs' => $config['params']['debug_allowed_ips'],
2410
];
2511
}
2612

0 commit comments

Comments
 (0)