From c3ed6ef9655968913eab0232f8ceed1bc2828429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Lenon?= Date: Fri, 11 Aug 2023 07:57:20 -0300 Subject: [PATCH] chore(docs): little improvements --- .../application-lifecycle.mdx | 2 +- docs/getting-started/configuration.mdx | 31 ++++++++++++------- package.json | 2 +- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/docs/architecture-concepts/application-lifecycle.mdx b/docs/architecture-concepts/application-lifecycle.mdx index 08a47864..3d8dd7f2 100644 --- a/docs/architecture-concepts/application-lifecycle.mdx +++ b/docs/architecture-concepts/application-lifecycle.mdx @@ -36,7 +36,7 @@ application you are using to build your solution, the explanation bellow is valid for all of them. The entry point of an Athenna application is the `bootstrap/main.ts` -file in Laravel project structure and `bin/main.ts` in slim project +file in the default project structure and `bin/main.ts` in slim project structure. The first action taken by Athenna itself is to create an instance of the application and then boot it. diff --git a/docs/getting-started/configuration.mdx b/docs/getting-started/configuration.mdx index 4b243764..b6a9ae00 100644 --- a/docs/getting-started/configuration.mdx +++ b/docs/getting-started/configuration.mdx @@ -27,10 +27,9 @@ be copied to `.env` and `.env.test`. :::note -If you are not using the Laravel project template, you can -simply create a `.env` file in the root path of your -application and Athenna will automatically resolve it for -you. +If you are not using the slim project structure, you can +create a `.env` file in the root path of your application +and Athenna will automatically resolve it for you. ::: @@ -193,10 +192,18 @@ console.log(Env('APP_URL')) // "http://localhost:3000" ## Configuration files All the configuration files for the Athenna framework are -stored in the `config` directory if you are using Laravel -based project template. Each option is documented, so feel -free to look through the files and get familiar with the -options available to you. +stored in the `config` directory if you are using the +default project template. Each option is documented, so +feel free to look through the files and get familiar with +the options available to you. + +:::info + +The slim template is configured to use `src/config` path +instead. But the folder does not exist in the project by +default. You can check how to change this path [in here](/docs/getting-started/configuration#define-my-own-configuration-path). + +::: Athenna needs almost no additional configuration out of the box. You are free to get started developing! Each @@ -446,20 +453,20 @@ await Config.loadAll(Path.stubs('config')) ### Define my own configuration path -If you are using the [slim](https://athenna.io/docs/getting-started/installation#laravel-project-structure) +If you are using the [slim](https://athenna.io/docs/getting-started/installation#project-structure) project structure, or you are building your own project structure, you are not going to have the config directory in your project root path. You will have two options now: -1. If you are using the [slim](https://athenna.io/docs/getting-started/installation#laravel-project-structure) +1. If you are using the [slim](https://athenna.io/docs/getting-started/installation#project-structure) project structure, you can create the `config` directory inside your `src` folder. 2. Specify to Athenna a different path to your `config` directory. :::note -The [slim](https://athenna.io/docs/getting-started/installation#laravel-project-structure) +The [slim](https://athenna.io/docs/getting-started/installation#project-structure) project structure is using the second option above to specify to Athenna that the configuration files will be inside of `src/config` directory. Check the examples @@ -469,7 +476,7 @@ above how this implementation works. To specify your application directories to Athenna, you can open the `.athennarc.json` file and add the `directories` -property to it. If you are using [slim](https://athenna.io/docs/getting-started/installation#laravel-project-structure) +property to it. If you are using [slim](https://athenna.io/docs/getting-started/installation#project-structure) project structure, you will already have this property defined. diff --git a/package.json b/package.json index e10f5101..579473f9 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athenna/docs", - "version": "3.0.0", + "version": "4.0.0", "private": true, "scripts": { "docusaurus": "docusaurus",