diff --git a/composer.json b/composer.json index 1627f1d..1ad20e8 100644 --- a/composer.json +++ b/composer.json @@ -22,5 +22,14 @@ "psr-4": { "Picea\\Asset\\": "src/" } + }, + "extra": { + "lean": { + "autoload": { + "definition": [ + "meta/definitions.php" + ] + } + } } } diff --git a/meta/definitions.php b/meta/definitions.php new file mode 100644 index 0000000..ad492c4 --- /dev/null +++ b/meta/definitions.php @@ -0,0 +1,19 @@ + 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)), +]; \ No newline at end of file