docs: general fixes across docs (#4737)
* docs: general fixes across docs * added deploy button to railway * fix eslint errors * fixes
This commit is contained in:
@@ -20,9 +20,11 @@ Before you start implementing the custom functionality in your module, it's reco
|
||||
```
|
||||
custom-module
|
||||
|
|
||||
|___ index.ts
|
||||
|
|
||||
|___ services // directory
|
||||
|___ src
|
||||
|
|
||||
|___ index.ts
|
||||
|
|
||||
|___ services // directory
|
||||
```
|
||||
|
||||
The directory can be an NPM project, but that is optional. `index.ts` acts as an entry point to your Module. You'll learn about its content in a later step. The `service` directory will hold your custom services. If you're adding other resources you can add other directories for them. For example, if you're adding an entity you can add a `models` directory.
|
||||
@@ -219,12 +221,14 @@ For example, consider you have the following file structure:
|
||||
|
|
||||
|___ custom-module
|
||||
| |
|
||||
| |___ index.ts
|
||||
| |
|
||||
| |___ services
|
||||
| | |
|
||||
| | |___ custom-service.ts
|
||||
| |___ // more files
|
||||
| |___ src
|
||||
| |
|
||||
| |___ index.ts
|
||||
| |
|
||||
| |___ services
|
||||
| | |
|
||||
| | |___ custom-service.ts
|
||||
| |___ // more files
|
||||
|
|
||||
|
|
||||
|___ medusa-backend
|
||||
@@ -240,7 +244,7 @@ module.exports = {
|
||||
modules: {
|
||||
// ...
|
||||
moduleType: {
|
||||
resolve: "../custom-module",
|
||||
resolve: "../custom-module/src",
|
||||
// ...
|
||||
},
|
||||
},
|
||||
@@ -255,7 +259,7 @@ module.exports = {
|
||||
modules: {
|
||||
// ...
|
||||
moduleType: {
|
||||
resolve: "../custom-module/index.ts",
|
||||
resolve: "../custom-module/src/index.ts",
|
||||
// ...
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user