From 64d408e54b44ac40611495ca4e184bd3b56a2ede Mon Sep 17 00:00:00 2001 From: Nuno Maduro Date: Wed, 23 Sep 2020 14:38:13 +0200 Subject: [PATCH] Adds the possibility of interpret dot files in the public directory as assets (#72) * No longer ignore dot files * No longer ignore dot files * Makes dot files as assets optional * Update AssetFiles.php * Apply fixes from StyleCI (#73) Co-authored-by: Taylor Otwell --- src/AssetFiles.php | 2 +- src/Manifest.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/AssetFiles.php b/src/AssetFiles.php index a1e68e64..d59f5217 100644 --- a/src/AssetFiles.php +++ b/src/AssetFiles.php @@ -31,7 +31,7 @@ public static function get($path) ->notName('mix-manifest.json') ->notName('*.php') ->ignoreVcs(true) - ->ignoreDotFiles(true) + ->ignoreDotFiles(!Manifest::dotFilesAsAssets()) ->sortByName(); } diff --git a/src/Manifest.php b/src/Manifest.php index 4696674c..a97ebf2e 100644 --- a/src/Manifest.php +++ b/src/Manifest.php @@ -67,6 +67,16 @@ public static function shouldSeparateVendor() return static::current()['separate-vendor'] ?? false; } + /** + * Determine if we should interpret dot files in the public directory as assets. + * + * @return bool + */ + public static function dotFilesAsAssets() + { + return static::current()['dot-files-as-assets'] ?? false; + } + /** * Write a fresh manifest file for the given project. *