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.
+6 -6
View File
@@ -44,7 +44,7 @@ export const generatedEditDates = {
"app/advanced-development/data-models/write-migration/page.mdx": "2024-07-15T17:46:10+02:00",
"app/advanced-development/data-models/manage-relationships/page.mdx": "2024-09-10T11:39:51.167Z",
"app/advanced-development/modules/remote-query/page.mdx": "2024-07-21T21:20:24+02:00",
"app/advanced-development/modules/options/page.mdx": "2024-09-30T08:43:53.126Z",
"app/advanced-development/modules/options/page.mdx": "2024-10-16T08:49:27.162Z",
"app/advanced-development/data-models/relationships/page.mdx": "2024-09-30T08:43:53.125Z",
"app/advanced-development/workflows/compensation-function/page.mdx": "2024-09-30T08:43:53.128Z",
"app/advanced-development/modules/service-factory/page.mdx": "2024-09-30T08:43:53.127Z",
@@ -75,8 +75,8 @@ export const generatedEditDates = {
"app/advanced-development/api-routes/validation/page.mdx": "2024-09-11T10:46:31.476Z",
"app/advanced-development/api-routes/errors/page.mdx": "2024-09-30T08:43:53.121Z",
"app/advanced-development/admin/constraints/page.mdx": "2024-09-10T11:39:51.165Z",
"app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx": "2024-09-30T08:43:53.139Z",
"app/debugging-and-testing/testing-tools/modules-tests/page.mdx": "2024-09-30T08:43:53.139Z",
"app/debugging-and-testing/testing-tools/modules-tests/module-example/page.mdx": "2024-10-16T08:50:03.061Z",
"app/debugging-and-testing/testing-tools/modules-tests/page.mdx": "2024-10-16T08:50:23.232Z",
"app/advanced-development/module-links/custom-columns/page.mdx": "2024-09-16T15:51:33.570Z",
"app/advanced-development/module-links/directions/page.mdx": "2024-09-16T15:37:51.441Z",
"app/advanced-development/module-links/page.mdx": "2024-09-16T15:36:48.190Z",
@@ -90,7 +90,7 @@ export const generatedEditDates = {
"app/advanced-development/workflows/page.mdx": "2024-09-18T08:00:57.364Z",
"app/advanced-development/workflows/variable-manipulation/page.mdx": "2024-09-30T08:43:53.130Z",
"app/customization/custom-features/api-route/page.mdx": "2024-09-12T12:42:34.201Z",
"app/customization/custom-features/module/page.mdx": "2024-10-03T13:03:41.359Z",
"app/customization/custom-features/module/page.mdx": "2024-10-16T08:49:44.676Z",
"app/customization/custom-features/workflow/page.mdx": "2024-09-30T08:43:53.133Z",
"app/customization/extend-models/create-links/page.mdx": "2024-09-30T08:43:53.133Z",
"app/customization/extend-models/extend-create-product/page.mdx": "2024-09-30T08:43:53.134Z",
@@ -104,7 +104,7 @@ export const generatedEditDates = {
"app/customization/integrate-systems/handle-event/page.mdx": "2024-09-30T08:43:53.135Z",
"app/customization/integrate-systems/page.mdx": "2024-09-12T12:33:29.827Z",
"app/customization/integrate-systems/schedule-task/page.mdx": "2024-09-30T08:43:53.135Z",
"app/customization/integrate-systems/service/page.mdx": "2024-09-30T08:43:53.135Z",
"app/customization/integrate-systems/service/page.mdx": "2024-10-16T08:49:50.899Z",
"app/customization/next-steps/page.mdx": "2024-09-12T10:50:04.873Z",
"app/customization/page.mdx": "2024-09-12T11:16:18.504Z",
"app/more-resources/cheatsheet/page.mdx": "2024-07-11T16:11:26.480Z",
@@ -113,5 +113,5 @@ export const generatedEditDates = {
"app/architecture/overview/page.mdx": "2024-09-23T12:55:01.339Z",
"app/advanced-development/data-models/infer-type/page.mdx": "2024-09-30T08:43:53.123Z",
"app/advanced-development/custom-cli-scripts/seed-data/page.mdx": "2024-10-03T11:11:07.181Z",
"app/basics/modules/page.mdx": "2024-10-03T13:05:49.551Z"
"app/basics/modules/page.mdx": "2024-10-16T08:49:39.997Z"
}