Skip to content

Commit 4cbbb33

Browse files
committed
chore(npm): update dependencies
1 parent 8320116 commit 4cbbb33

File tree

5 files changed

+53
-32
lines changed

5 files changed

+53
-32
lines changed

docs/cli-application/commands.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -990,7 +990,7 @@ Now we map our new template in `.athennarc.json`:
990990
{
991991
"templates": {
992992
...
993-
"repository": "./src/resources/templates/repository.edge"
993+
"repository": "./resources/templates/repository.edge"
994994
...
995995
}
996996
}

docs/getting-started/athennarc-file.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -274,9 +274,10 @@ resolve the paths of your application:
274274
"seeders": "src/database/seeders",
275275
"migrations": "src/database/migrations",
276276
"lang": "src/lang",
277-
"resources": "src/resources",
278-
"views": "src/resources/views",
279-
"locales": "src/resources/locales",
277+
"resources": "resources",
278+
"views": "resources/views",
279+
"locales": "resources/locales",
280+
"apiResources": "src/resources",
280281
"providers": "src/providers",
281282
"facades": "src/facades",
282283
"routes": "src/routes",

docs/rest-api-application/web-application.mdx

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ With this option set, SSR will be turn on into your application.
117117
This defines where Vite needs to look when compiling your server
118118
entrypoint files.
119119

120-
Default: `src/resources/app/app.tsx`
120+
Default: `resources/app/app.tsx`
121121

122122
#### ssrBuildDirectory
123123

@@ -166,7 +166,7 @@ function to the `styleAttributes` option.
166166
export default {
167167
vite: {
168168
styleAttributes: ({ src, url }) => {
169-
if (src === 'src/resources/css/admin.css') {
169+
if (src === 'resources/css/admin.css') {
170170
return {
171171
'data-turbo-track': 'reload'
172172
}
@@ -198,7 +198,7 @@ accepts an array of entrypoints and returns the script and the link tags.
198198
<head>
199199
<meta charset="UTF-8">
200200
<meta name="viewport" content="width=device-width, initial-scale=1.0">
201-
@vite(['src/resources/js/app.ts'])
201+
@vite(['resources/js/app.ts'])
202202
</head>
203203
<body>
204204

@@ -236,11 +236,11 @@ during development.
236236
- Return a URL pointing to the output filename during production.
237237

238238
```html
239-
<link rel="stylesheet" href="{{ asset('src/resources/css/app.css') }}">
239+
<link rel="stylesheet" href="{{ asset('resources/css/app.css') }}">
240240
```
241241

242242
```html title="Output in development"
243-
<link rel="stylesheet" href="http://localhost:5173/src/resources/css/app.css">
243+
<link rel="stylesheet" href="http://localhost:5173/resources/css/app.css">
244244
```
245245

246246
```html title="Output in production"
@@ -256,7 +256,7 @@ Therefore, you will have to notify Vite about the existence of these
256256
assets using its [Glob imports](https://vite.dev/guide/features.html#glob-import) API.
257257

258258
In the following example, we ask Vite to process all the files within the
259-
`src/resources/img` directory. This code should be written within an entry point file:
259+
`resources/img` directory. This code should be written within an entry point file:
260260

261261
```typescript
262262
import.meta.glob(['../img/**'])
@@ -265,7 +265,7 @@ import.meta.glob(['../img/**'])
265265
Now you can reference the images within your Edge templates as follows:
266266

267267
```html
268-
<img src="{{ asset('src/resources/img/hero.jpg') }}" />
268+
<img src="{{ asset('resources/img/hero.jpg') }}" />
269269
```
270270

271271
## Enabling HMR with React
@@ -281,7 +281,7 @@ written before you include the entrypoints using the `@vite` tag.
281281
<meta charset="UTF-8">
282282
<meta name="viewport" content="width=device-width, initial-scale=1.0">
283283
@viteReactRefresh()
284-
@vite(['src/resources/js/app.ts'])
284+
@vite(['resources/js/app.ts'])
285285
</head>
286286
<body>
287287

@@ -300,7 +300,7 @@ import athenna from '@athenna/vite/plugins/client'
300300
export default defineConfig({
301301
plugins: [
302302
athenna({
303-
entrypoints: ["src/resources/js/app.ts"],
303+
entrypoints: ["resources/js/app.ts"],
304304
}),
305305
react() 👈
306306
]
@@ -341,8 +341,8 @@ import athenna from '@athenna/vite/plugins/client'
341341
export default defineConfig({
342342
plugins: [
343343
athenna({
344-
entrypoints: ['src/resources/js/app.ts'],
345-
reloads: ['src/resources/views/**/*.edge'],
344+
entrypoints: ['resources/js/app.ts'],
345+
reloads: ['resources/views/**/*.edge'],
346346
assetsUrl: 'https://cdn.example.com/',
347347
}),
348348
]
@@ -386,7 +386,7 @@ export default {
386386
vite: {
387387
// ...
388388

389-
ssrEntrypoint: 'src/resources/app/app.tsx',
389+
ssrEntrypoint: 'resources/app/app.tsx',
390390
ssrBuildDirectory: Path.public('assets/server')
391391
}
392392
}
@@ -468,7 +468,7 @@ In case you want to import other components beside the entrypoint
468468
you can use the `loadComponent()` method:
469469

470470
```typescript
471-
const { createApp } = await React.loadComponent('src/resources/app/app.tsx')
471+
const { createApp } = await React.loadComponent('resources/app/app.tsx')
472472
```
473473

474474
## Manifest file

docs/the-basics/helpers.mdx

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4263,7 +4263,7 @@ Merge the project root path with `Path.dirs.resources`:
42634263
```typescript
42644264
import { Path } from '@athenna/common'
42654265

4266-
console.log(Path.resources()) // /home/user/athenna-project/src/resources
4266+
console.log(Path.resources()) // /home/user/athenna-project/resources
42674267
```
42684268

42694269
#### `Path::setResources()`
@@ -4276,24 +4276,44 @@ import { Path } from '@athenna/common'
42764276
Path.setResources('resources/app')
42774277
```
42784278

4279-
#### `Path::routes()`
4279+
#### `Path::resources()`
4280+
4281+
Merge the project root path with `Path.dirs.resources`:
4282+
4283+
```typescript
4284+
import { Path } from '@athenna/common'
4285+
4286+
console.log(Path.resources()) // /home/user/athenna-project/resources
4287+
```
4288+
4289+
#### `Path::setResources()`
4290+
4291+
Set the `Path.dirs.resources` value:
4292+
4293+
```typescript
4294+
import { Path } from '@athenna/common'
4295+
4296+
Path.setResources('resources/app')
4297+
```
4298+
4299+
#### `Path::apiResources()`
42804300

4281-
Merge the project root path with `Path.dirs.routes`:
4301+
Merge the project root path with `Path.dirs.apiResources`:
42824302

42834303
```typescript
42844304
import { Path } from '@athenna/common'
42854305

4286-
console.log(Path.routes()) // /home/user/athenna-project/src/routes
4306+
console.log(Path.apiResources()) // /home/user/athenna-project/src/resources
42874307
```
42884308

4289-
#### `Path::setRoutes()`
4309+
#### `Path::setApiResources()`
42904310

4291-
Set the `Path.dirs.routes` value:
4311+
Set the `Path.dirs.apiResources` value:
42924312

42934313
```typescript
42944314
import { Path } from '@athenna/common'
42954315

4296-
Path.setRoutes('routes/app')
4316+
Path.setApiResources('resources/app')
42974317
```
42984318

42994319
#### `Path::storage()`
@@ -4363,7 +4383,7 @@ Merge the project root path with `Path.dirs.views`:
43634383
```typescript
43644384
import { Path } from '@athenna/common'
43654385

4366-
console.log(Path.views()) // /home/user/athenna-project/src/resources/views
4386+
console.log(Path.views()) // /home/user/athenna-project/resources/views
43674387
```
43684388

43694389
#### `Path::setViews()`
@@ -4423,7 +4443,7 @@ Merge the project root path with `Path.dirs.locales`:
44234443
```typescript
44244444
import { Path } from '@athenna/common'
44254445

4426-
console.log(Path.locales()) // /home/user/athenna-project/src/resources/locales
4446+
console.log(Path.locales()) // /home/user/athenna-project/resources/locales
44274447
```
44284448

44294449
#### `Path::setLocales()`

src/components/path.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,23 +5,23 @@ export default function Path(props: { father: string; child: string }) {
55
let father = props.father
66

77
switch (props.father) {
8-
case 'resources':
9-
father = 'src/resources'
10-
break
118
case 'storage':
129
father = 'src/storage'
1310
break
1411
case 'logs':
1512
father = 'src/storage/logs'
1613
break
14+
case 'resources':
15+
father = 'resources'
16+
break
1717
case 'views':
18-
father = 'src/resources/views'
18+
father = 'resources/views'
1919
break
2020
case 'locales':
21-
father = 'src/resources/locales'
21+
father = 'resources/locales'
2222
break
2323
case 'static':
24-
father = 'src/resources/static'
24+
father = 'public/static'
2525
break
2626
case 'config':
2727
father = 'src/config'

0 commit comments

Comments
 (0)