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

Commit

Permalink
refactor: composer.json scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
darkalchemy committed Jun 27, 2020
1 parent a8ac736 commit 444724a
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 31 deletions.
5 changes: 3 additions & 2 deletions bin/utilities.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
];

$languages = [];
$locales = $container->get(I18n::class)->getSupportedLocales();
$locales = $container->get(I18n::class)->getSupportedLocales();
foreach ($locales as $locale) {
$languages[] = str_replace('-', '_', $locale);
}
$process = 'compile';
$lang = 'en_US';
$lang = 'en_US';
foreach ($argv as $arg) {
if (in_array($arg, $processes)) {
$process = $arg;
Expand All @@ -39,6 +39,7 @@
break;
case 'clear_cache':
remove_cached_files($container);

break;
default:
compile_twig_templates($container);
Expand Down
45 changes: 16 additions & 29 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,49 +66,36 @@
"sort-packages": true
},
"scripts": {
"cleanup": [
"vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --show-progress=dots -vvv"
],
"dump": [
"composer dump-autoload -a"
],
"cleanup": "vendor/friendsofphp/php-cs-fixer/php-cs-fixer fix --show-progress=dots -vvv",
"dump": "composer dump-autoload -a",
"post-install-cmd": [
"composer dump-autoload -o",
"Umpirsky\\PermissionsHandler\\ScriptHandler::setPermissions"
],
"post-update-cmd": [
"composer dump-autoload -o"
],
"post-create-project-cmd": [
"php -r \"copy('config/settings.example.php', 'config/settings.php');\""
],
"migrate": [
"vendor/bin/phinx migrate -c config/phinx.php -e default --ansi"
],
"rollback": [
"vendor/bin/phinx rollback -c config/phinx.php -e default --ansi -t 0"
],
"post-update-cmd": "composer dump-autoload -o",
"post-create-project-cmd": "php -r \"copy('config/settings.example.php', 'config/settings.php');\"",
"migrate": "vendor/bin/phinx migrate -c config/phinx.php -e default --ansi",
"rollback": "vendor/bin/phinx rollback -c config/phinx.php -e default --ansi -t 0",
"compile": [
"php bin/utilities.php compile",
"Umpirsky\\PermissionsHandler\\ScriptHandler::setPermissions"
],
"translate": [
"php bin/utilities.php translate"
],
"clear_cache": [
"php bin/utilities.php clear_cache"
],
"set-perms": [
"Umpirsky\\PermissionsHandler\\ScriptHandler::setPermissions"
]
"translate": "php bin/utilities.php translate",
"clear_cache": "php bin/utilities.php clear_cache",
"set-perms": "Umpirsky\\PermissionsHandler\\ScriptHandler::setPermissions"
},
"extra": {
"writable-dirs": ["var/cache", "var/logs", "var/tmp", "resources/views/cache/"]
"writable-dirs": [
"var/cache",
"var/logs",
"var/tmp",
"resources/views/cache/"
]
},
"repositories": [
{
"type": "vcs",
"url": "[email protected]:darkalchemy/PermissionsHandler.git"
"url": "[email protected]:darkalchemy/PermissionsHandler.git"
}
]
}

0 comments on commit 444724a

Please sign in to comment.