Setup eslint and enforce rules
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -1,17 +1,15 @@
|
||||
import {Template} from "../Template"
|
||||
import {UniversalPath} from "../../util"
|
||||
import {Template} from '../Template'
|
||||
|
||||
/**
|
||||
* Template that generates a new application unit class in app/units.
|
||||
*/
|
||||
const unit_template: Template = {
|
||||
const templateUnit: Template = {
|
||||
name: 'unit',
|
||||
fileSuffix: '.ts',
|
||||
description: 'Create a service unit that will start and stop with your application.',
|
||||
baseAppPath: ['units'],
|
||||
render(name: string, fullCanonicalName: string, targetFilePath: UniversalPath) {
|
||||
return `import {Singleton, Inject} from "@extollo/di"
|
||||
import {Unit, Logging} from "@extollo/lib"
|
||||
render(name: string) {
|
||||
return `import {Singleton, Inject, Unit, Logging} from '@extollo/lib'
|
||||
|
||||
/**
|
||||
* ${name} Unit
|
||||
@@ -32,7 +30,7 @@ export class ${name} extends Unit {
|
||||
}
|
||||
}
|
||||
`
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export { unit_template }
|
||||
export { templateUnit }
|
||||
|
||||
Reference in New Issue
Block a user