Skip to content

Commit

Permalink
fix(templates): use getters in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jlenon7 committed Jul 7, 2022
1 parent b0b0c3a commit bbb956c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@athenna/artisan",
"version": "1.3.0",
"version": "1.3.1",
"description": "The Athenna CLI application. Built on top of commander.",
"license": "MIT",
"author": "João Lenon <[email protected]>",
Expand Down
8 changes: 6 additions & 2 deletions templates/__name__Command.js.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,16 @@ export class <%= namePascal %>Command extends Command {
/**
* The name and signature of the console command.
*/
signature = 'your:command <yourArgument>'
get signature() {
return 'your:command <yourArgument>'
}

/**
* The console command description.
*/
description = 'Your command description.'
get description() {
return 'Your command description.'
}

/**
* Set additional flags in the commander instance.
Expand Down
23 changes: 6 additions & 17 deletions templates/__name__Provider.js.ejs
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
import { ServiceProvider } from '@athenna/ioc'

export class <%= namePascal %>Provider extends ServiceProvider {
/**
* All the container bindings that should be registered.
*/
bindings = {}

/**
* All the container instances that should be registered.
*/
instances = {}

/**
* All the container singletons that should be registered.
*/
singletons = {}

/**
* Register any application service provider.
*
* @return {void|Promise<void>}
*/
register() {}
async register() {}

/**
* Bootstrap any application service provider.
*
* @return {void|Promise<void>}
*/
boot() {}
async boot() {}
}

0 comments on commit bbb956c

Please sign in to comment.