- WIP on Picea's assets
This commit is contained in:
1 parent
4c0cddd617
commit
bc6880c166
6 files changed
+53
-48
No files matched your search
@@ -37,14 +37,10 @@ return [
|
||||
],
|
||||
|
||||
'asset' => [
|
||||
"public_path" => getenv("PUBLIC_PATH"),
|
||||
'destination_path' => "static",
|
||||
'source' => [
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), "asset", '' ]),
|
||||
'order' => 10
|
||||
]
|
||||
],
|
||||
[
|
||||
'path' => implode(DIRECTORY_SEPARATOR, [ getenv("PROJECT_PATH"), "asset", '' ]),
|
||||
'order' => 10
|
||||
]
|
||||
],
|
||||
|
||||
'extensions' => [],
|
||||
|
||||
@@ -4,7 +4,10 @@ use function DI\autowire, DI\create, DI\get;
|
||||
|
||||
use Laminas\Diactoros\Response\HtmlResponse;
|
||||
|
||||
use Picea\{Asset\Action\InstallActionInterface,
|
||||
use Picea\{
|
||||
Asset,
|
||||
Asset\Action,
|
||||
Asset\Action\InstallActionInterface,
|
||||
Language\LanguageRegistration,
|
||||
Caching\Cache,
|
||||
Caching\Opcache,
|
||||
@@ -16,7 +19,6 @@ use Picea\{Asset\Action\InstallActionInterface,
|
||||
Method\Request};
|
||||
use Picea\Extension\{ LanguageHandlerInterface, LanguageExtension, TitleExtension, NumberExtension, UrlExtension };
|
||||
use Picea\Ui\{ Method, Ui };
|
||||
use Picea\Asset\{ Asset, Action };
|
||||
|
||||
return [
|
||||
Picea\Picea::class => function($c) {
|
||||
@@ -29,7 +31,11 @@ return [
|
||||
|
||||
Ui::class => autowire(Ui::class),
|
||||
|
||||
Asset::class => autowire(Asset::class),
|
||||
Asset\Asset::class => autowire(Asset\Asset::class),
|
||||
|
||||
Asset\Config::class => create(Asset\Config::class)->constructor(
|
||||
destination: getenv("PUBLIC_PATH") . DIRECTORY_SEPARATOR . "static"
|
||||
),
|
||||
|
||||
Compiler::class => autowire(Compiler::class),
|
||||
|
||||
@@ -43,7 +49,7 @@ return [
|
||||
|
||||
LanguageHandlerInterface::class => autowire(\Lean\LanguageHandler::class),
|
||||
|
||||
LanguageRegistration::class => create(\Lean\PiceaDefaultRegistration::class)->constructor(get('picea.extensions'), [], [], get(Ui::class), get(Asset::class)),
|
||||
LanguageRegistration::class => create(\Lean\PiceaDefaultRegistration::class)->constructor(get('picea.extensions'), [], [], get(Ui::class), get(Asset\Asset::class)),
|
||||
|
||||
'picea.extensions' => function(\Psr\Container\ContainerInterface $c) {
|
||||
return array_merge([
|
||||
@@ -71,8 +77,8 @@ return [
|
||||
return new FileFetcher($c->get(Lean\Lean::class)->getViewPaths());
|
||||
},
|
||||
|
||||
Picea\Asset\FileFetcher::class => function($c) {
|
||||
return new Picea\Asset\FileFetcher($c->get(Lean\Lean::class)->getAssetPaths());
|
||||
Asset\FileFetcher::class => function($c) {
|
||||
return new Asset\FileFetcher($c->get(Lean\Lean::class)->getAssetPaths());
|
||||
},
|
||||
|
||||
Action\Install::class => autowire(Action\Install::class)->constructor(get(Action\InstallActionInterface::class), []),
|
||||
|
||||
Reference in new issue
Block a user