added installer

This commit is contained in:
Arsen Mirzaev Tatyano-Muradovich 2024-01-11 05:38:30 +07:00
parent 87a80b7c91
commit a0621b623b
18 changed files with 46 additions and 33 deletions

View File

@ -2,13 +2,13 @@
declare(strict_types=1);
namespace {$REPO_OWNER}\{$REPO_NAME}\controllers;
namespace ${REPO_OWNER}\${REPO_NAME}\controllers;
// Files of the project
use {$REPO_OWNER}\{$REPO_NAME}\views\manager,
{$REPO_OWNER}\{$REPO_NAME}\models\core as models,
{$REPO_OWNER}\{$REPO_NAME}\models\account_model as account,
{$REPO_OWNER}\{$REPO_NAME}\models\session_model as session;
use ${REPO_OWNER}\${REPO_NAME}\views\manager,
${REPO_OWNER}\${REPO_NAME}\models\core as models,
${REPO_OWNER}\${REPO_NAME}\models\account_model as account,
${REPO_OWNER}\${REPO_NAME}\models\session_model as session;
// Library for ArangoDB
use ArangoDBClient\Document as _document;
@ -19,8 +19,8 @@ use mirzaev\minimal\controller;
/**
* Core of controllers
*
* @package {$REPO_OWNER}\{$REPO_NAME}\controllers
* @author {$REPO_OWNER} < mail >
* @package ${REPO_OWNER}\${REPO_NAME}\controllers
* @author ${REPO_OWNER} < mail >
*/
class core extends controller
{

View File

@ -2,16 +2,16 @@
declare(strict_types=1);
namespace {$REPO_OWNER}\{$REPO_NAME}\controllers;
namespace ${REPO_OWNER}\${REPO_NAME}\controllers;
// Files of the project
use {$REPO_OWNER}\{$REPO_NAME}\controllers\core;
use ${REPO_OWNER}\${REPO_NAME}\controllers\core;
/**
* Index controller
*
* @package {$REPO_OWNER}\{$REPO_NAME}\controllers
* @author {$REPO_OWNER} < mail >
* @package ${REPO_OWNER}\${REPO_NAME}\controllers
* @author ${REPO_OWNER} < mail >
*/
final class index extends core
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace {$REPO_OWNER}\{$REPO_NAME}\models;
namespace ${REPO_OWNER}\${REPO_NAME}\models;
// Framework for PHP
use mirzaev\minimal\model;
@ -22,8 +22,8 @@ use exception;
/**
* Core of models
*
* @package {$REPO_OWNER}\{$REPO_NAME}\controllers
* @author {$REPO_OWNER} < mail >
* @package ${REPO_OWNER}\${REPO_NAME}\controllers
* @author ${REPO_OWNER} < mail >
*/
class core extends model
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace {$REPO_OWNER}\{$REPO_NAME}\models;
namespace ${REPO_OWNER}\${REPO_NAME}\models;
// Files of the project
use mirzaev\ebala\models\account,
@ -21,8 +21,8 @@ use exception;
/**
* Model of session
*
* @package {$REPO_OWNER}\{$REPO_NAME}\controllers
* @author {$REPO_OWNER} < mail >
* @package ${REPO_OWNER}\${REPO_NAME}\controllers
* @author ${REPO_OWNER} < mail >
*/
final class session extends core
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace {$REPO_OWNER}\{$REPO_NAME}\models\traits;
namespace ${REPO_OWNER}\${REPO_NAME}\models\traits;
// Built-in libraries
use exception;
@ -10,9 +10,9 @@ use exception;
/**
* Trait fo initialization of a status
*
* @package {$REPO_OWNER}\{$REPO_NAME}\models\traits
* @package ${REPO_OWNER}\${REPO_NAME}\models\traits
*
* @author {$REPO_OWNER} < mail >
* @author ${REPO_OWNER} < mail >
*/
trait status
{

View File

@ -2,7 +2,7 @@
declare(strict_types=1);
namespace {$REPO_OWNER}\{$REPO_NAME};
namespace ${REPO_OWNER}\${REPO_NAME};
use mirzaev\minimal\core;
use mirzaev\minimal\router;

View File

@ -2,7 +2,7 @@
return [
'endpoint' => 'unix:///var/run/arangodb3/arango.sock',
'database' => '{$REPO_NAME}',
'name' => '{$REPO_NAME}',
'database' => '${REPO_NAME}',
'name' => '${REPO_NAME}',
'password' => ''
];

View File

@ -2,11 +2,11 @@
declare(strict_types=1);
namespace {$REPO_OWNER}\{$REPO_NAME}\views;
namespace ${REPO_OWNER}\${REPO_NAME}\views;
// Files of the project
use {$REPO_OWNER}\{$REPO_NAME}\models\session,
{$REPO_OWNER}\{$REPO_NAME}\models\account;
use ${REPO_OWNER}\${REPO_NAME}\models\session,
${REPO_OWNER}\${REPO_NAME}\models\account;
// Framework for PHP
use mirzaev\minimal\controller;
@ -24,8 +24,8 @@ use ArrayAccess;
/**
* Templater core
*
* @package {$REPO_OWNER}\{$REPO_NAME}\views
* @author {$REPO_OWNER} < mail >
* @package ${REPO_OWNER}\${REPO_NAME}\views
* @author ${REPO_OWNER} < mail >
*/
final class templater extends controller implements ArrayAccess
{

View File

@ -4,7 +4,7 @@
"readme": "README.md",
"keywords": [],
"type": "",
"homepage": "{$REPO_SSH_URL}",
"homepage": "${REPO_HTTPS_URL}",
"license": "WTFPL",
"authors": [
{
@ -15,8 +15,8 @@
}
],
"support": {
"docs": "{$REPO_SSH_URL}/manual",
"issues": "{$REPO_SSH_URL}/issues"
"docs": "${REPO_HTTPS_URL}/manual",
"issues": "${REPO_HTTPS_URL}/issues"
},
"require": {
"php": "~8.3",
@ -32,12 +32,15 @@
},
"autoload": {
"psr-4": {
"{$REPO_OWNER}\\{$REPO_NAME}\\": "{$REPO_OWNER}/{$REPO_NAME}/system"
"${REPO_OWNER}\\${REPO_NAME}\\": "${REPO_OWNER}/${REPO_NAME}/system"
}
},
"autoload-dev": {
"psr-4": {
"{$REPO_OWNER}\\{$REPO_NAME}\\tests\\": "{$REPO_OWNER}/{$REPO_NAME}/tests"
"${REPO_OWNER}\\${REPO_NAME}\\tests\\": "${REPO_OWNER}/${REPO_NAME}/tests"
}
},
"scripts": {
"pre-install-cmd": "bash ./install.sh"
}
}

10
install.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
if [ -d author/project ]; then
mv author/project author/${REPO_NAME}
fi
if [ -d author ]; then
mv author ${REPO_OWNER}
fi