Skip to content

Commit

Permalink
🏗️ Update the project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
siguici committed Nov 7, 2023
1 parent 66994d7 commit da36fa6
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 25 deletions.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@
},
"autoload": {
"psr-4": {
"App\\": "app/src/",
"App\\": "app/",
"My\\": "src/",
"Database\\Factories\\": "database/factories/",
"Database\\Seeders\\": "database/seeders/"
}
Expand Down
3 changes: 2 additions & 1 deletion phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ includes:
parameters:
level: max
paths:
- app/src
- app
- src

reportUnmatchedIgnoredErrors: true
checkMissingIterableValueType: false
3 changes: 2 additions & 1 deletion phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
</php>
<source>
<include>
<directory suffix=".php">./app/src</directory>
<directory suffix=".php">./app</directory>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>
3 changes: 2 additions & 1 deletion rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@

return static function (RectorConfig $rectorConfig): void {
$rectorConfig->paths([
__DIR__.'/app/src',
__DIR__.'/app',
__DIR__.'/src',
__DIR__.'/tests',
]);

Expand Down
Empty file added src/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ export default {
content: [
"./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php",
"./storage/framework/views/*.php",
"./app/res/**/*.{js,jsx,ts,tsx,md,mdx}",
"./app/res/views/**/*.blade.php",
"./app/src/Views/**/*.php",
"./resources/**/*.{js,jsx,ts,tsx,md,mdx}",
"./resources/views/**/*.blade.php",
"./app/Views/**/*.php",
],

theme: {
Expand Down
2 changes: 1 addition & 1 deletion templates/layouts/base.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<meta name="{{ $meta_tag['name'] }}" content="{{ $meta_tag['content'] }}"/>
@endforeach
@endisset
@vite(['app/res/assets/styles/app.css', 'app/res/assets/scripts/app.ts'])
@vite(['resources/assets/styles/app.css', 'resources/assets/scripts/app.ts'])
@livewireStyles
@show
</head>
Expand Down
18 changes: 9 additions & 9 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"include": [
"app/res/assets/types/**/*",
"app/res/assets/scripts/**/*",
"app/res/views/**/*",
"resources/assets/types/**/*",
"resources/assets/scripts/**/*",
"resources/views/**/*",
],
"exclude": [
"node_modules",
Expand All @@ -28,7 +28,7 @@
"outDir": "tmp",
"noEmit": true,
"typeRoots": [
"./app/res/assets/types",
"./resources/assets/types",
"./node_modules/@types",
"./node_modules",
],
Expand All @@ -40,19 +40,19 @@
"baseUrl": ".",
"paths": {
"App/Assets/*": [
"app/res/assets/*",
"resources/assets/*",
],
"App/Images/*": [
"app/res/assets/images/*",
"resources/assets/images/*",
],
"App/Styles/*": [
"app/res/assets/styles/*",
"resources/assets/styles/*",
],
"App/Scripts/*": [
"app/res/assets/scripts/*",
"resources/assets/scripts/*",
],
"App/Types/*": [
"app/res/assets/types/*",
"resources/assets/types/*",
],
},
"noImplicitAny": true,
Expand Down
16 changes: 8 additions & 8 deletions vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ export default defineConfig(({ mode }) => {
plugins: [
laravel({
input: [
"app/res/assets/styles/app.css",
"app/res/assets/scripts/app.ts",
"resources/assets/styles/app.css",
"resources/assets/scripts/app.ts",
],
refresh: [...refreshPaths, "app/res/views/**", "app/src/Views/**"],
refresh: [...refreshPaths, "templates/**", "app/Views/**"],
buildDirectory,
}),
tsconfigPaths(),
Expand All @@ -35,11 +35,11 @@ export default defineConfig(({ mode }) => {
},
resolve: {
alias: {
"@assets": "app/res/assets",
"@images": "app/res/assets/images",
"@scripts": "app/res/assets/scripts",
"@styles": "app/res/assets/styles",
"@types": "app/res/assets/types",
"@assets": "resources/assets",
"@images": "resources/assets/images",
"@scripts": "resources/assets/scripts",
"@styles": "resources/assets/styles",
"@types": "resources/assets/types",
},
},
};
Expand Down

0 comments on commit da36fa6

Please sign in to comment.