Skip to content

Commit

Permalink
Adds the possibility of interpret dot files in the public directory a…
Browse files Browse the repository at this point in the history
…s 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 <[email protected]>
  • Loading branch information
nunomaduro and taylorotwell authored Sep 23, 2020
1 parent 445fefc commit 64d408e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/AssetFiles.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static function get($path)
->notName('mix-manifest.json')
->notName('*.php')
->ignoreVcs(true)
->ignoreDotFiles(true)
->ignoreDotFiles(!Manifest::dotFilesAsAssets())
->sortByName();
}

Expand Down
10 changes: 10 additions & 0 deletions src/Manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand Down

0 comments on commit 64d408e

Please sign in to comment.