Sistema web para crear proyecto web nuevo
This commit is contained in:
33
setup/common/config.php
Normal file
33
setup/common/config.php
Normal file
@ -0,0 +1,33 @@
|
||||
<?php
|
||||
return [
|
||||
'base_url' => '/provm/projects',
|
||||
'gitea' => function() {
|
||||
$arr = [];
|
||||
$arr['url'] = 'https://git.provm.cl/api/swagger';
|
||||
$arr['api_key'] = 'd877e5ce64352c914657fa491fa7ae1722ad734f';
|
||||
return (object) $arr;
|
||||
},
|
||||
'urls' => function() {
|
||||
$arr = [
|
||||
'base' => '/provm/projects'
|
||||
];
|
||||
$arr['api'] = implode('/', [
|
||||
$arr['base'],
|
||||
'api'
|
||||
]);
|
||||
return (object) $arr;
|
||||
},
|
||||
'folders' => function() {
|
||||
$arr = [];
|
||||
$arr['base'] = dirname(__DIR__, 2);
|
||||
$arr['resources'] = implode(DIRECTORY_SEPARATOR, [
|
||||
$arr['base'],
|
||||
'resources'
|
||||
]);
|
||||
$arr['routes'] = implode(DIRECTORY_SEPARATOR, [
|
||||
$arr['resources'],
|
||||
'routes'
|
||||
]);
|
||||
return (object) $arr;
|
||||
}
|
||||
];
|
14
setup/common/setup.php
Normal file
14
setup/common/setup.php
Normal file
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
use Psr\Container\ContainerInterface as Container;
|
||||
|
||||
return [
|
||||
ProVM\Common\Service\Composer::class => function(Container $c) {
|
||||
return new ProVM\Common\Service\Composer(implode(DIRECTORY_SEPARATOR, [
|
||||
$c->get('folders')->base,
|
||||
'composer.json'
|
||||
]));
|
||||
},
|
||||
ProVM\Projects\Common\Service\Projects::class => function(Container $c) {
|
||||
return new ProVM\Projects\Common\Service\Projects(implode(DIRECTORY_SEPARATOR, [dirname($c->get('folders')->base), 'demos']));
|
||||
}
|
||||
];
|
Reference in New Issue
Block a user