Moved views out of resources folder and removed pre-compiled resouces from release artifacts

This commit is contained in:
Chris Kankiewicz
2020-01-31 15:18:40 -07:00
parent a3ad101e3c
commit 25f3011c54
15 changed files with 9 additions and 5 deletions

View File

@@ -20,15 +20,18 @@ test: # Run coding standards/static analysis checks and tests
tunnel: # Expose the application via secure tunnel
@ngrok http -host-header=rewrite http://directory-lister.local:80
clear-assets: # Clear the compiled assets
@rm app/assets/* -rfv
clear-cache: # Clear the application cache
@rm app/cache/* -rfv
tar: # Generate tarball
@tar --verbose --create --gzip --exclude-vcs --exclude app/cache/* \
@tar --verbose --create --gzip --exclude-vcs --exclude app/cache/* --exclude app/resources \
--file artifacts/$(ARTIFACT_NAME).tar.gz $(ARTIFACT_FILES)
zip: # Generate zip file
@zip --exclude "*.git*" --exclude "app/cache/**" \
@zip --verbose --exclude "*.git*" "app/cache/**" "app/resources/*" \
--recurse-paths artifacts/$(ARTIFACT_NAME).zip $(ARTIFACT_FILES)
artifacts: production tar zip # Generate release artifacts
artifacts: clear-assets production tar zip # Generate release artifacts

View File

@@ -1,3 +1,2 @@
*
!/images/
!.gitignore

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@@ -50,7 +50,7 @@ class TwigProvider
*/
public function __invoke(): void
{
$twig = new Twig(new FilesystemLoader('app/resources/views'));
$twig = new Twig(new FilesystemLoader('app/views'));
$twig->getEnvironment()->setCache(
$this->config->get('view.cache', 'app/cache/views')

View File

@@ -15,6 +15,8 @@ mix.sass('app/resources/sass/app.scss', 'app/assets/app.css').options({
mix.js('app/resources/js/app.js', 'app/assets/app.js');
mix.copyDirectory('app/resources/images', 'app/assets/images');
mix.copyDirectory(
'node_modules/@fortawesome/fontawesome-free/webfonts',
'app/assets/webfonts'