Skip to content

Commit

Permalink
feat: adjust templates and module creation
Browse files Browse the repository at this point in the history
  • Loading branch information
rsaz committed Mar 22, 2024
1 parent 48dde67 commit 56aaea6
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/generate/form.ts
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ const splitTarget = async ({
target.includes("\\") ||
target.includes("//")
) {
//pathContent = target.split("/").filter((item) => item !== "");
if (schematic === "service") schematic = "controller";
if (
schematic === "service" ||
Expand Down Expand Up @@ -450,6 +449,8 @@ const schematicFolder = (schematic: string): string | undefined => {
return "entities";
case "middleware":
return "providers/middlewares";
case "module":
return "useCases";
}

return undefined;
Expand Down
3 changes: 2 additions & 1 deletion src/generate/templates/module-default.tpl
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { ContainerModule } from "inversify";
import { CreateModule } from "@expressots/core";

export const {{moduleName}}Module = CreateModule([]);
export const {{moduleName}}Module: ContainerModule = CreateModule([]);
3 changes: 2 additions & 1 deletion src/generate/templates/module.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ContainerModule } from "inversify";
import { CreateModule } from "@expressots/core";
import { {{className}}Controller } from "{{{path}}}";

export const {{moduleName}}Module = CreateModule([{{className}}Controller]);
export const {{moduleName}}Module: ContainerModule = CreateModule([{{className}}Controller]);

0 comments on commit 56aaea6

Please sign in to comment.