forked from timacdonald/alfresco
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bootstrap.php
31 lines (26 loc) · 1.14 KB
/
bootstrap.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
use Alfresco\Render\Factory;
use Alfresco\Translation;
use Illuminate\Config\Repository as Configuration;
use Illuminate\Container\Container;
use Spatie\ShikiPhp\Shiki;
return tap(Container::getInstance(), function (Container $container) {
$container->instance(Container::class, $container);
$container->singleton(Configuration::class, fn () => new Configuration([
'debug' => false,
'language' => 'en',
'root_directory' => __DIR__,
'build_directory' => __DIR__.'/build/output',
'cache_directory' => __DIR__.'/build/cache',
'resource_directory' => __DIR__.'/resources',
'index_directory' => __DIR__.'/build/indexes',
'component_directory' => __DIR__.'/resources/components',
'translation_directory' => __DIR__.'/resources/translations',
'replacements_directory' => __DIR__.'/resources/replacements',
]));
$container->bind(Shiki::class, fn (Container $container) => new Shiki(
$container->make(Configuration::class)->get('root_directory').'/theme.json'
));
$container->singleton(Factory::class);
$container->singleton(Translation::class);
});