Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
:update filesystem generate
Browse files Browse the repository at this point in the history
  • Loading branch information
naagaraa committed Nov 20, 2022
1 parent 7a889d6 commit b4651ce
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 30 deletions.
25 changes: 12 additions & 13 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"name": "nagara/mini-mvc-php-native",
"description": "MINI MVC PHP NATIVE PROJECT NATIVE FRAMEWORK",
"homepage": "https://github.com/naagaraa/mini-mvc-php-native",
"name": "nagara/framework",
"description": "php framework project bahasa indonesia for old school",
"type": "project",
"keywords": [
"framework",
Expand All @@ -15,7 +14,7 @@
"kint-php/kint": "^4.2.3",
"markrogoyski/math-php": "^1.10",
"maximebf/debugbar": "^1.18.1",
"michelf/php-markdown": "dev-lib",
"michelf/php-markdown": "^2.0.0",
"mpdf/mpdf": "^8.0",
"phpmailer/phpmailer": "^6.2",
"phpoffice/phpspreadsheet": "^1.18",
Expand All @@ -32,6 +31,13 @@
"codeception/module-asserts": "^1.0.0"
},
"license": "MIT",
"authors": [
{
"name": "naagaraa",
"email": "ekabersinar@gmail.com"
}
],
"minimum-stability": "dev",
"autoload": {
"psr-4": {
"app\\": "apps/",
Expand All @@ -46,14 +52,6 @@
"vendor/vlucas/phpdotenv/src"
]
},
"authors": [
{
"name": "naagaraa",
"email": "ekabersinar@gmail.com",
"role": "developer"
}
],
"minimum-stability": "dev",
"archive": {
"directory": "dist",
"skip-dev": false
Expand All @@ -66,7 +64,8 @@
},
"scripts": {
"post-create-project-cmd": [
"@php nagara generate:env"
"@php nagara generate:env",
"composer update"
]
},
"repositories": [
Expand Down
27 changes: 12 additions & 15 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions system/filesystem/FileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ public static function create_env()

if (file_exists($newpt . '//.env')) {
$FileEnvirotmentVariabel = fopen($newpt . '//.env', "w") or die("Unable to open file!");
$txt = "# config file .env untuk configurasi pada file\n# apps/config/database.php\n# apps/config/constant.php\n\nAPP_DEBUG=true\nAPP_ENV=local\nAPP_MAINTENANCE=off\n\n# configurasi Path here\nAPP_NAME=" . $new_project . "\nAPP_HOST=http://localhost/\n\n# configurasi Database here\nDB_TYPE=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_NAME=" . $new_project . "\nDB_USERNAME=root\nDB_PASSWORD=\n\n# configurasi mailer (on development)\nMAIL_DEBUG=true\nMAIL_MAILER=smtp\nMAIL_HOST=mailhog\nMAIL_PORT=1025\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_ADDRESS=null\nMAIL_FROM_NAME='$" . "{" . "APP_NAME" . "}'";
$txt = "# config file .env untuk configurasi pada file\n# apps/config/database.php\n# apps/config/constant.php\n\nAPP_DEBUG=true\nAPP_ENV=development\nAPP_MAINTENANCE=off\n\n# configurasi Path here\nAPP_NAME=" . $new_project . "\nAPP_HOST=http://localhost/\n\n# configurasi Database here\nDB_TYPE=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_NAME=" . $new_project . "\nDB_USERNAME=root\nDB_PASSWORD=\n\n# configurasi mailer (on development)\nMAIL_DEBUG=true\nMAIL_MAILER=smtp\nMAIL_HOST=mailhog\nMAIL_PORT=1025\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_ADDRESS=null\nMAIL_FROM_NAME='$" . "{" . "APP_NAME" . "}'";

fwrite($FileEnvirotmentVariabel, $txt);
fclose($FileEnvirotmentVariabel);
} else {
$FileEnvirotmentVariabel = fopen($newpt . '//.env', "w") or die("Unable to open file!");
$txt = "# config file .env untuk configurasi pada file\n# apps/config/database.php\n# apps/config/constant.php\n\nAPP_DEBUG=true\nAPP_ENV=local\nAPP_MAINTENANCE=off\n\n# configurasi Path here\nAPP_NAME=" . $new_project . "\nAPP_HOST=http://localhost/\n\n# configurasi Database here\nDB_TYPE=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_NAME=" . $new_project . "\nDB_USERNAME=root\nDB_PASSWORD=\n\n# configurasi mailer (on development)\nMAIL_DEBUG=true\nMAIL_MAILER=smtp\nMAIL_HOST=mailhog\nMAIL_PORT=1025\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_ADDRESS=null\nMAIL_FROM_NAME='$" . "{" . "APP_NAME" . "}'";
$txt = "# config file .env untuk configurasi pada file\n# apps/config/database.php\n# apps/config/constant.php\n\nAPP_DEBUG=true\nAPP_ENV=development\nAPP_MAINTENANCE=off\n\n# configurasi Path here\nAPP_NAME=" . $new_project . "\nAPP_HOST=http://localhost/\n\n# configurasi Database here\nDB_TYPE=mysql\nDB_HOST=localhost\nDB_PORT=3306\nDB_NAME=" . $new_project . "\nDB_USERNAME=root\nDB_PASSWORD=\n\n# configurasi mailer (on development)\nMAIL_DEBUG=true\nMAIL_MAILER=smtp\nMAIL_HOST=mailhog\nMAIL_PORT=1025\nMAIL_USERNAME=null\nMAIL_PASSWORD=null\nMAIL_ENCRYPTION=null\nMAIL_FROM_ADDRESS=null\nMAIL_FROM_NAME='$" . "{" . "APP_NAME" . "}'";

fwrite($FileEnvirotmentVariabel, $txt);
fclose($FileEnvirotmentVariabel);
Expand Down

0 comments on commit b4651ce

Please sign in to comment.