-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
66 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
<?php | ||
|
||
/* | ||
* UserFrosting Vue Demo (http://www.userfrosting.com) | ||
* | ||
* @link https://github.com/userfrosting/demo-vue | ||
* @copyright Copyright (c) 2023 Louis Charette | ||
* @license https://github.com/userfrosting/demo-vue/blob/main/LICENSE.md (MIT License) | ||
*/ | ||
|
||
namespace UserFrosting\Demo; | ||
|
||
use UserFrosting\Config\Config; | ||
use UserFrosting\ServicesProvider\ServicesProviderInterface; | ||
use UserFrosting\UniformResourceLocator\ResourceLocatorInterface; | ||
use UserFrosting\ViteTwig\ViteManifest; | ||
use UserFrosting\ViteTwig\ViteManifestInterface; | ||
use UserFrosting\ViteTwig\ViteTwigExtension; | ||
|
||
class Services implements ServicesProviderInterface | ||
{ | ||
public function register(): array | ||
{ | ||
return [ | ||
ViteManifestInterface::class => function (ResourceLocatorInterface $locator, Config $config) { | ||
$manifest = new ViteManifest( | ||
manifestPath: (string) $locator->getResource('public://.vite/manifest.json'), | ||
basePath: $config->getString('vite.base', ''), | ||
devEnabled: $config->getBool('vite.dev', true), | ||
serverUrl: $config->getString('vite.server', ''), | ||
); | ||
|
||
return $manifest; | ||
} | ||
]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters