- Registered to Lean's autoload
This commit is contained in:
parent
03f8f80293
commit
7178335c27
|
@ -22,5 +22,14 @@
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"Picea\\Asset\\": "src/"
|
"Picea\\Asset\\": "src/"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"extra": {
|
||||||
|
"lean": {
|
||||||
|
"autoload": {
|
||||||
|
"definition": [
|
||||||
|
"meta/definitions.php"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
use Picea\{ Asset, Language\LanguageRegistration, Ui\Ui };
|
||||||
|
|
||||||
|
use function DI\{get, autowire, create};
|
||||||
|
|
||||||
|
return [
|
||||||
|
Asset\Asset::class => autowire(Asset\Asset::class),
|
||||||
|
|
||||||
|
Asset\Config::class => create(Asset\Config::class)->constructor(
|
||||||
|
destination: getenv("PUBLIC_PATH") . DIRECTORY_SEPARATOR . "static"
|
||||||
|
),
|
||||||
|
|
||||||
|
Asset\FileFetcher::class => function($c) {
|
||||||
|
return new Asset\FileFetcher($c->get(Lean\Lean::class)->getAssetPaths());
|
||||||
|
},
|
||||||
|
|
||||||
|
LanguageRegistration::class => create(\Lean\PiceaDefaultRegistration::class)->constructor(get('picea.extensions'), [], [], get(Ui::class), get(Asset\Asset::class)),
|
||||||
|
];
|
Loading…
Reference in New Issue