docs: update resolve path to use src (#9605)

Update path used in `resolve` of modules to start with `src`
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-10-16 09:10:30 +00:00
1 parent 20428dac71
commit 714b9e6c98
23 files changed
+41 -41

No files matched your search

@@ -25,7 +25,7 @@ module.exports = defineConfig({
// ...
modules: [
{
resolve: "./modules/hello",
resolve: "./src/modules/hello",
options: {
capitalize: true,
},
+2 -2
View File
@@ -134,13 +134,13 @@ module.exports = defineConfig({
},
modules: [
{
resolve: "./modules/hello",
resolve: "./src/modules/hello",
}
]
})
```
Its value is an array of objects, each having a `resolve` property, whose value is either a path to module's directory relative to `src` (it shouldn't include `src` in the path), or an `npm` package’s name.
Its value is an array of objects, each having a `resolve` property, whose value is either a path to module's directory, or an `npm` package’s name.
### 5. Generate Migrations
@@ -104,7 +104,7 @@ module.exports = defineConfig({
// ...
modules: [
{
resolve: "./modules/brand",
resolve: "./src/modules/brand",
}
]
})
@@ -187,7 +187,7 @@ module.exports = defineConfig({
// ...
modules: [
{
resolve: "./modules/brand",
resolve: "./src/modules/brand",
options: {
apiKey: process.env.BRAND_API_KEY || "temp",
},
@@ -47,7 +47,7 @@ import MyCustom from "../models/my-custom"
moduleIntegrationTestRunner<HelloModuleService>({
moduleName: HELLO_MODULE,
moduleModels: [MyCustom],
resolve: "./modules/hello",
resolve: "./src/modules/hello",
testSuite: ({ service }) => {
describe("HelloModuleService", () => {
it("says hello world", () => {
@@ -32,7 +32,7 @@ import MyCustom from "../models/my-custom"
moduleIntegrationTestRunner<HelloModuleService>({
moduleName: HELLO_MODULE,
moduleModels: [MyCustom],
resolve: "./modules/hello",
resolve: "./src/modules/hello",
testSuite: ({ service }) => {
// TODO write tests
},
@@ -43,7 +43,7 @@ The `moduleIntegrationTestRunner` function accepts as a parameter an object with
- `moduleName`: The name of the module.
- `moduleModels`: An array of models in the module. Refer to [this section](#write-tests-for-modules-without-data-models) if your module doesn't have data models.
- `resolve`: The path to the model relative to the `src` directory.
- `resolve`: The path to the model.
- `testSuite`: A function that defines the tests to run.
The `testSuite` function accepts as a parameter an object having the `service` property, which is an instance of the module's main service.