-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply feedback Signed-off-by: Yaapa Hage <[email protected]>
- Loading branch information
Yaapa Hage
committed
Aug 24, 2020
1 parent
3157719
commit 6c8bc9b
Showing
4 changed files
with
13 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8
packages/cli/generators/extension/templates/src/component.ts.ejs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
import {Component, ProviderMap} from '@loopback/core'; | ||
import {<%= project.name.charAt(0).toUpperCase() + project.name.slice(1) %>Bindings} from './keys' | ||
import {<%= project.name.toUpperCase() %>_OPTIONS} from './types'; | ||
import {<%= project.bindingsNamespace %>} from './keys' | ||
import {<%= project.defaultOptions %>, <%= project.optionsInterface %>} from './types'; | ||
|
||
@bind({tags: {[ContextTags.KEY]: {<%= project.name.charAt(0).toUpperCase() + project.name.slice(1) %>Bindings.COMPONENT}}) | ||
@bind({tags: {[ContextTags.KEY]: {<%= project.bindingsNamespace %>.COMPONENT}}) | ||
export class <%= project.componentName %> implements Component { | ||
constructor( | ||
@inject(CoreBindings.APPLICATION_INSTANCE) | ||
private application: Application, | ||
@config() | ||
options: Options = <%= project.name.toUpperCase() %>_OPTIONS, | ||
options: <%= project.optionsInterface %> = <%= project.defaultOptions %>, | ||
) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
export interface <%= project.name.charAt(0).toUpperCase() + project.name.slice(1) %>Options { | ||
export interface <%= project.optionsInterface %> { | ||
|
||
} | ||
|
||
export const <%= project.name.toUpperCase() %>_OPTIONS: <%= project.name.charAt(0).toUpperCase() + project.name.slice(1) %>Options = { | ||
export const <%= project.defaultOptions %>: <%= project.optionsInterface %> = { | ||
|
||
}; |