diff --git a/.gitignore b/.gitignore index 678e80bc..d3a622b4 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -/public/node_modules -/vendor -/.release embedded.txt .DS_Store +/.release +/packages +/public/packages diff --git a/.php-cs-fixer.php b/.php-cs-fixer.php index eb465d8e..a6046355 100644 --- a/.php-cs-fixer.php +++ b/.php-cs-fixer.php @@ -1,7 +1,7 @@ exclude(['vendor']) + ->exclude(['packages']) ->ignoreVCSIgnored(true) ->files()->name('*.php') ->in(__DIR__) diff --git a/.yarnrc b/.yarnrc index b2588659..65cc233b 100644 --- a/.yarnrc +++ b/.yarnrc @@ -1,4 +1,4 @@ ---modules-folder public/node_modules +--modules-folder public/packages --install.production true --install.ignore-scripts true --install.ignore-optional true diff --git a/app.php b/app.php index 2af4d1ad..31905be6 100644 --- a/app.php +++ b/app.php @@ -9,7 +9,7 @@ use Slim\Factory\AppFactory; use Slim\Views\Blade; // Load composer dependencies -require_once __DIR__ . '/vendor/autoload.php'; +require_once __DIR__ . '/packages/autoload.php'; // Load config files require_once GROCY_DATAPATH . '/config.php'; diff --git a/composer.json b/composer.json index c213f23e..8e81942c 100644 --- a/composer.json +++ b/composer.json @@ -38,6 +38,7 @@ ] }, "config": { + "vendor-dir": "packages", "platform-check": false } } diff --git a/helpers/PrerequisiteChecker.php b/helpers/PrerequisiteChecker.php index caac8c3f..da431b4b 100644 --- a/helpers/PrerequisiteChecker.php +++ b/helpers/PrerequisiteChecker.php @@ -26,9 +26,9 @@ class PrerequisiteChecker private function checkForComposer() { - if (!file_exists(__DIR__ . '/../vendor/autoload.php')) + if (!file_exists(__DIR__ . '/../packages/autoload.php')) { - throw new ERequirementNotMet('/vendor/autoload.php not found. Have you run Composer?'); + throw new ERequirementNotMet('/packages/autoload.php not found. Have you run Composer?'); } } diff --git a/views/layout/default.blade.php b/views/layout/default.blade.php index ff1dd224..10669240 100644 --- a/views/layout/default.blade.php +++ b/views/layout/default.blade.php @@ -20,51 +20,51 @@ @yield('title') | Grocy - - - - @if(in_array('bootstrap-combobox', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - @endif @if(in_array('bootstrap-select', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - @endif @if(in_array('datatables', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - - - - @endif @if(in_array('tempusdominus', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - @endif @if(in_array('summernote', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - @endif @if(in_array('animatecss', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - @endif @if(in_array('fullcalendar', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - @endif @if(in_array('daterangepicker', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - @endif @@ -687,61 +687,61 @@ - - - - - - @if(!empty($__t('moment_locale') && $__t('moment_locale') != 'x'))@endif - - - - + + + + + + @if(!empty($__t('moment_locale') && $__t('moment_locale') != 'x'))@endif + + + + @if(in_array('bootstrap-combobox', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - + @endif @if(in_array('datatables', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - - - - - - - - - - + + + + + + + + + + @endif @if(in_array('tempusdominus', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - + @endif @if(in_array('summernote', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - - @if(!empty($__t('summernote_locale') && $__t('summernote_locale') != 'x'))@endif + + @if(!empty($__t('summernote_locale') && $__t('summernote_locale') != 'x'))@endif @endif @if(in_array('bootstrap-select', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - - @if(!empty($__t('bootstrap-select_locale') && $__t('bootstrap-select_locale') != 'x'))@endif + + @if(!empty($__t('bootstrap-select_locale') && $__t('bootstrap-select_locale') != 'x'))@endif @endif @if(in_array('fullcalendar', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - - @if(!empty($__t('fullcalendar_locale') && $__t('fullcalendar_locale') != 'x'))@endif + + @if(!empty($__t('fullcalendar_locale') && $__t('fullcalendar_locale') != 'x'))@endif @endif @if(in_array('daterangepicker', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - + @endif @if(in_array('quagga2', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - + @endif @if(in_array('bwipjs', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - + @endif @if(in_array('chartjs', $GROCY_REQUIRED_FRONTEND_PACKAGES)) - - - - + + + + @endif diff --git a/views/openapiui.blade.php b/views/openapiui.blade.php index b6453ff5..412ef336 100644 --- a/views/openapiui.blade.php +++ b/views/openapiui.blade.php @@ -16,7 +16,7 @@ {{ $__t('REST API browser') }} | Grocy - @if(file_exists(GROCY_DATAPATH . '/custom_css.html')) @@ -55,9 +55,9 @@
- - - + + + @if(file_exists(GROCY_DATAPATH . '/custom_js.html')) diff --git a/views/stockentrylabel.blade.php b/views/stockentrylabel.blade.php index 9c13d7ba..f2038594 100644 --- a/views/stockentrylabel.blade.php +++ b/views/stockentrylabel.blade.php @@ -2,7 +2,7 @@ {{ $product->name }} -