77}
88
99return function (Pimple \Container $ container ) {
10- $ data = include __DIR__ . '/../src/data.php ' ;
11-
12- $ container ['react.components ' ] = function ($ container ) use ($ data ) {
10+ $ container ['react.components ' ] = function ($ container ) {
1311 /** @var Github\Client $client */
1412 $ client = $ container ['github.client ' ];
1513
@@ -44,7 +42,7 @@ function ($version) use ($component) {
4442 Github \HttpClient \Message \ResponseMediator::getContent ($ response ),
4543 $ component
4644 );
47- }, $ data [ ' components ' ] );
45+ }, include __DIR__ . ' /../data/ components.php ' );
4846 };
4947
5048 $ container ['react.components_by_category ' ] = function ($ container ) {
@@ -62,22 +60,22 @@ function ($version) use ($component) {
6260 return $ byCategory ;
6361 };
6462
65- $ container ['react.built_with ' ] = function ($ container ) use ( $ data ) {
63+ $ container ['react.built_with ' ] = function ($ container ) {
6664 /** @var Github\Client $client */
6765 $ client = $ container ['github.client ' ];
6866
6967 return array_map (function ($ component ) use ($ client ) {
70- list ( $ username , $ repository) = explode ('/ ' , $ component ['repository ' ]);
68+ [ $ username , $ repository] = explode ('/ ' , $ component ['repository ' ]);
7169
7270 return array_merge (
7371 $ client ->repo ()->show ($ username , $ repository ),
7472 $ component
7573 );
76- }, $ data [ ' built_with ' ] );
74+ }, include __DIR__ . ' /../data/ built_with.php ' );
7775 };
7876
79- $ container ['react.articles ' ] = $ data [ ' articles ' ] ;
80- $ container ['react.talks ' ] = $ data [ ' talks ' ] ;
77+ $ container ['react.articles ' ] = include __DIR__ . ' /../data/ articles.php ' ;
78+ $ container ['react.talks ' ] = include __DIR__ . ' /../data/ talks.php ' ;
8179
8280 $ container ['github.url_generator ' ] = $ container ->extend ('github.url_generator ' , function (callable $ urlGenerator ) {
8381 return function (string $ repository , string $ url , string $ cwd = null ) use ($ urlGenerator ) {
@@ -95,7 +93,7 @@ function ($version) use ($component) {
9593 };
9694 });
9795
98- $ container ['template.theme ' ] = __DIR__ . '/../src/ theme ' ;
96+ $ container ['template.theme ' ] = __DIR__ . '/../theme ' ;
9997
10098 $ container ['template.map ' ] = [
10199 'index.html ' => 'homepage.html.twig '
@@ -375,7 +373,7 @@ function ($string) {
375373 $ twig ->addGlobal (
376374 'asset_manifest ' ,
377375 json_decode (
378- file_get_contents (__DIR__ .'/../src/ static-files/assets/manifest.json ' ),
376+ file_get_contents (__DIR__ .'/../static-files/assets/manifest.json ' ),
379377 true
380378 )
381379 );
@@ -397,7 +395,7 @@ function ($string) {
397395 ->files ()
398396 ->ignoreDotFiles (false )
399397 ->notName ('.DS_Store ' )
400- ->in ($ path . '/src/ static-files ' );
398+ ->in ($ path . '/static-files ' );
401399 });
402400
403401 $ container ['document.finder ' ] = $ container ->protect (function ($ path ) {
@@ -408,6 +406,6 @@ function ($string) {
408406 ->name ('LICENSE ' )
409407 ->files ()
410408 ->in ($ path . '/tmp/components ' )
411- ->in ($ path . '/src/ pages ' );
409+ ->in ($ path . '/pages ' );
412410 });
413411};
0 commit comments