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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -4,7 +4,7 @@
"readme": "README.md", "readme": "README.md",
"keywords": [], "keywords": [],
"type": "", "type": "",
"homepage": "{$REPO_SSH_URL}", "homepage": "${REPO_HTTPS_URL}",
"license": "WTFPL", "license": "WTFPL",
"authors": [ "authors": [
{ {
@ -15,8 +15,8 @@
} }
], ],
"support": { "support": {
"docs": "{$REPO_SSH_URL}/manual", "docs": "${REPO_HTTPS_URL}/manual",
"issues": "{$REPO_SSH_URL}/issues" "issues": "${REPO_HTTPS_URL}/issues"
}, },
"require": { "require": {
"php": "~8.3", "php": "~8.3",
@ -32,12 +32,15 @@
}, },
"autoload": { "autoload": {
"psr-4": { "psr-4": {
"{$REPO_OWNER}\\{$REPO_NAME}\\": "{$REPO_OWNER}/{$REPO_NAME}/system" "${REPO_OWNER}\\${REPO_NAME}\\": "${REPO_OWNER}/${REPO_NAME}/system"
} }
}, },
"autoload-dev": { "autoload-dev": {
"psr-4": { "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