diff --git a/app/dist/.gitignore b/app/assets/.gitignore similarity index 100% rename from app/dist/.gitignore rename to app/assets/.gitignore diff --git a/app/Bootstrap/AppManager.php b/app/src/Bootstrap/AppManager.php similarity index 100% rename from app/Bootstrap/AppManager.php rename to app/src/Bootstrap/AppManager.php diff --git a/app/Controllers/DirectoryController.php b/app/src/Controllers/DirectoryController.php similarity index 100% rename from app/Controllers/DirectoryController.php rename to app/src/Controllers/DirectoryController.php diff --git a/app/Controllers/FileInfoController.php b/app/src/Controllers/FileInfoController.php similarity index 100% rename from app/Controllers/FileInfoController.php rename to app/src/Controllers/FileInfoController.php diff --git a/app/Middleware/StripBasePathMiddleware.php b/app/src/Middleware/StripBasePathMiddleware.php similarity index 100% rename from app/Middleware/StripBasePathMiddleware.php rename to app/src/Middleware/StripBasePathMiddleware.php diff --git a/app/Providers/ConfigProvider.php b/app/src/Providers/ConfigProvider.php similarity index 100% rename from app/Providers/ConfigProvider.php rename to app/src/Providers/ConfigProvider.php diff --git a/app/Providers/FinderProvider.php b/app/src/Providers/FinderProvider.php similarity index 100% rename from app/Providers/FinderProvider.php rename to app/src/Providers/FinderProvider.php diff --git a/app/Providers/TwigProvider.php b/app/src/Providers/TwigProvider.php similarity index 100% rename from app/Providers/TwigProvider.php rename to app/src/Providers/TwigProvider.php diff --git a/app/SortMethods/Accessed.php b/app/src/SortMethods/Accessed.php similarity index 100% rename from app/SortMethods/Accessed.php rename to app/src/SortMethods/Accessed.php diff --git a/app/SortMethods/Changed.php b/app/src/SortMethods/Changed.php similarity index 100% rename from app/SortMethods/Changed.php rename to app/src/SortMethods/Changed.php diff --git a/app/SortMethods/Modified.php b/app/src/SortMethods/Modified.php similarity index 100% rename from app/SortMethods/Modified.php rename to app/src/SortMethods/Modified.php diff --git a/app/SortMethods/Name.php b/app/src/SortMethods/Name.php similarity index 100% rename from app/SortMethods/Name.php rename to app/src/SortMethods/Name.php diff --git a/app/SortMethods/Natural.php b/app/src/SortMethods/Natural.php similarity index 100% rename from app/SortMethods/Natural.php rename to app/src/SortMethods/Natural.php diff --git a/app/SortMethods/SortMethod.php b/app/src/SortMethods/SortMethod.php similarity index 100% rename from app/SortMethods/SortMethod.php rename to app/src/SortMethods/SortMethod.php diff --git a/app/SortMethods/Type.php b/app/src/SortMethods/Type.php similarity index 100% rename from app/SortMethods/Type.php rename to app/src/SortMethods/Type.php diff --git a/app/Support/Helpers.php b/app/src/Support/Helpers.php similarity index 100% rename from app/Support/Helpers.php rename to app/src/Support/Helpers.php diff --git a/app/ViewFunctions/Asset.php b/app/src/ViewFunctions/Asset.php similarity index 91% rename from app/ViewFunctions/Asset.php rename to app/src/ViewFunctions/Asset.php index d97afc9..4d2f2c6 100644 --- a/app/ViewFunctions/Asset.php +++ b/app/src/ViewFunctions/Asset.php @@ -5,7 +5,7 @@ namespace App\ViewFunctions; class Asset extends ViewFunction { /** @const Constant description */ - protected const ASSET_PATH = '/app/dist/'; + protected const ASSET_PATH = '/app/assets/'; /** @var string The function name */ protected $name = 'asset'; diff --git a/app/ViewFunctions/Breadcrumbs.php b/app/src/ViewFunctions/Breadcrumbs.php similarity index 100% rename from app/ViewFunctions/Breadcrumbs.php rename to app/src/ViewFunctions/Breadcrumbs.php diff --git a/app/ViewFunctions/Config.php b/app/src/ViewFunctions/Config.php similarity index 100% rename from app/ViewFunctions/Config.php rename to app/src/ViewFunctions/Config.php diff --git a/app/ViewFunctions/Icon.php b/app/src/ViewFunctions/Icon.php similarity index 100% rename from app/ViewFunctions/Icon.php rename to app/src/ViewFunctions/Icon.php diff --git a/app/ViewFunctions/Markdown.php b/app/src/ViewFunctions/Markdown.php similarity index 100% rename from app/ViewFunctions/Markdown.php rename to app/src/ViewFunctions/Markdown.php diff --git a/app/ViewFunctions/ParentDir.php b/app/src/ViewFunctions/ParentDir.php similarity index 100% rename from app/ViewFunctions/ParentDir.php rename to app/src/ViewFunctions/ParentDir.php diff --git a/app/ViewFunctions/SizeForHumans.php b/app/src/ViewFunctions/SizeForHumans.php similarity index 100% rename from app/ViewFunctions/SizeForHumans.php rename to app/src/ViewFunctions/SizeForHumans.php diff --git a/app/ViewFunctions/Url.php b/app/src/ViewFunctions/Url.php similarity index 100% rename from app/ViewFunctions/Url.php rename to app/src/ViewFunctions/Url.php diff --git a/app/ViewFunctions/ViewFunction.php b/app/src/ViewFunctions/ViewFunction.php similarity index 100% rename from app/ViewFunctions/ViewFunction.php rename to app/src/ViewFunctions/ViewFunction.php diff --git a/composer.json b/composer.json index 370e113..4e8db03 100644 --- a/composer.json +++ b/composer.json @@ -30,7 +30,7 @@ }, "autoload": { "psr-4": { - "App\\": "app/" + "App\\": "app/src/" } }, "autoload-dev": { diff --git a/psalm.xml b/psalm.xml index 40f492b..f4f070b 100644 --- a/psalm.xml +++ b/psalm.xml @@ -18,7 +18,7 @@ - + diff --git a/tests/ViewFunctions/AssetTest.php b/tests/ViewFunctions/AssetTest.php index 666e4d9..14c576d 100644 --- a/tests/ViewFunctions/AssetTest.php +++ b/tests/ViewFunctions/AssetTest.php @@ -11,8 +11,8 @@ class AssetTest extends TestCase { $asset = new Asset($this->container, $this->config); - $this->assertEquals('/app/dist/css/app.css', $asset('css/app.css')); - $this->assertEquals('/app/dist/js/app.js', $asset('js/app.js')); + $this->assertEquals('/app/assets/css/app.css', $asset('css/app.css')); + $this->assertEquals('/app/assets/js/app.js', $asset('js/app.js')); } public function test_it_can_return_an_asset_with_a_subdirectory(): void @@ -21,7 +21,7 @@ class AssetTest extends TestCase $asset = new Asset($this->container, $this->config); - $this->assertEquals('/some/dir/app/dist/css/app.css', $asset('css/app.css')); - $this->assertEquals('/some/dir/app/dist/js/app.js', $asset('js/app.js')); + $this->assertEquals('/some/dir/app/assets/css/app.css', $asset('css/app.css')); + $this->assertEquals('/some/dir/app/assets/js/app.js', $asset('js/app.js')); } } diff --git a/webpack.mix.js b/webpack.mix.js index 820d64a..313cd7a 100644 --- a/webpack.mix.js +++ b/webpack.mix.js @@ -8,16 +8,16 @@ mix.webpackConfig({ watchOptions: { ignored: ['node_modules', 'vendor'] } }); -mix.sass('app/resources/sass/app.scss', 'app/dist/app.css').options({ +mix.sass('app/resources/sass/app.scss', 'app/assets/app.css').options({ processCssUrls: false, postCss: [tailwindcss('tailwind.config.js')] }); -mix.js('app/resources/js/app.js', 'app/dist/app.js'); +mix.js('app/resources/js/app.js', 'app/assets/app.js'); mix.copyDirectory( 'node_modules/@fortawesome/fontawesome-free/webfonts', - 'app/dist/webfonts' + 'app/assets/webfonts' ); mix.purgeCss({