Skip to content

Commit

Permalink
Merge pull request #41 from expressots/refactor/adjust-nonop-templates
Browse files Browse the repository at this point in the history
fix: update nonop controller and usecase template
  • Loading branch information
rsaz committed Apr 11, 2024
2 parents a779d8b + 1a84a3a commit 0bd2325
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 13 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"cp:templates": "cp -r ./src/generate/templates ./bin/generate/templates && cp -r ./src/providers/prisma/templates ./bin/providers/prisma/templates",
"clean": "rimraf ./bin",
"prepublish": "npm run build && npm pack",
"publish": "npm publish --tag latest",
"format": "prettier --write \"./src/**/*.ts\" --cache",
"lint": "eslint \"./src/**/*.ts\"",
"lint:fix": "eslint \"./src/**/*.ts\" --fix",
Expand Down
10 changes: 2 additions & 8 deletions src/generate/templates/nonopinionated/controller.tpl
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
import { BaseController } from "@expressots/core";
import { controller, {{method}} } from "@expressots/adapter-express";
import { controller } from "@expressots/adapter-express";

@controller("/{{{route}}}")
export class {{className}}{{schematic}} {
@{{method}}("/")
execute() {
return "{{schematic}}";
}
}
export class {{className}}{{schematic}} {}
6 changes: 1 addition & 5 deletions src/generate/templates/nonopinionated/usecase.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import { provide } from "inversify-binding-decorators";

@provide({{className}}{{schematic}})
export class {{className}}{{schematic}} {
execute() {
return "{{schematic}}";
}
}
export class {{className}}{{schematic}} {}

0 comments on commit 0bd2325

Please sign in to comment.