diff --git a/src/FabriqCoreServiceProvider.php b/src/FabriqCoreServiceProvider.php index 0d20baf..235bcaf 100644 --- a/src/FabriqCoreServiceProvider.php +++ b/src/FabriqCoreServiceProvider.php @@ -174,10 +174,10 @@ protected function resourceDirectories() : array protected function standardPaths() : array { return [ + __DIR__.'/../resources/css' => resource_path('css'), __DIR__.'/../resources/images' => public_path('images'), - __DIR__.'/../resources/images' => resource_path('images'), + __DIR__.'/../resources/js' => resource_path('js'), __DIR__.'/../resources/fonts' => public_path('fonts'), - __DIR__.'/../resources/css' => resource_path('css'), __DIR__.'/../tailwind.config.js' => 'tailwind.config.js', __DIR__.'/../vite.config.js' => 'vite.config.js', __DIR__.'/../postcss.config.js' => 'postcss.config.js', diff --git a/tests/AuthFeatureTest.php b/tests/AuthFeatureTest.php index 4bb49a4..cc526b0 100644 --- a/tests/AuthFeatureTest.php +++ b/tests/AuthFeatureTest.php @@ -13,12 +13,19 @@ public function setUp() : void parent::setUp(); // dd(base_path('tests/_fixtures/distFixture/mix-manifest.json')); $fixturePath = __DIR__ . '/_fixtures/'; - if(! file_exists(base_path('public/dist'))) { + if (! file_exists(base_path('public/dist'))) { mkdir(base_path('public/dist')); } - if(! file_exists(base_path('public/dist/mix-manifest.json'))) { + if (! file_exists(base_path('public/dist/mix-manifest.json'))) { copy($fixturePath . 'mix-manifest.json', base_path('public/dist/mix-manifest.json')); } + + if (! file_exists(base_path('public/build'))) { + mkdir(base_path('public/build')); + } + if (! file_exists(base_path('public/build/manifest.json'))) { + copy($fixturePath . 'manifest.json', base_path('public/build/manifest.json')); + } } /** @test **/ diff --git a/tests/_fixtures/manifest.json b/tests/_fixtures/manifest.json new file mode 100644 index 0000000..2b97d5a --- /dev/null +++ b/tests/_fixtures/manifest.json @@ -0,0 +1,23 @@ +{ + "resources/js/main.js": { + "file": "assets/main.f4f5d0a1.js", + "src": "resources/js/main.js", + "isEntry": true, + "imports": [ + "_vendor.99dbdb1e.js" + ], + "css": [ + "assets/main.387ec448.css" + ], + "assets": [ + "assets/ikoncept-logo.1abf4988.svg", + "assets/fabriq-cms-logo.4bb6f3c3.svg" + ] + }, + "_vendor.99dbdb1e.js": { + "file": "assets/vendor.99dbdb1e.js", + "css": [ + "assets/vendor.4a5fa02d.css" + ] + } + }