Skip to content

Commit

Permalink
CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Jan 30, 2020
1 parent 38aee60 commit a9d471b
Show file tree
Hide file tree
Showing 7 changed files with 25 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@

## development

See the [kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md) for instructions setting up your development environment. Once you have completed that, use the following yarn scripts.
See the [kibana contributing guide](https://github.com/elastic/kibana/blob/master/CONTRIBUTING.md) for instructions setting up your development environment.

Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export const <%= upperCamelCaseName %>App = ({ basename, notifications, http, na
<p>
<FormattedMessage
id="<%= camelCase(name) %>.content"
defaultMessage="Look through the generated code and checkout the plugin development documentation."
defaultMessage="Look through the generated code and check out the plugin development documentation."
/>
</p>
<EuiHorizontalRule/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@
import './index.scss';
<%_ } -%>

import { <%= upperCamelCaseName %>PublicPlugin } from './plugin';
import { <%= upperCamelCaseName %>Plugin } from './plugin';

// These exports are the public contract for your static code and types.
export function plugin() {
return new <%= upperCamelCaseName %>PublicPlugin();
return new <%= upperCamelCaseName %>Plugin();
}

export * from '../common';
export * from './types';
export {
<%= upperCamelCaseName %>PluginSetup,
<%= upperCamelCaseName %>PluginStart,
} from './types';

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { i18n } from '@kbn/i18n';
import { AppMountParameters, CoreSetup, CoreStart, Plugin } from '<%= relRoot %>/src/core/public';
import { <%= upperCamelCaseName %>PublicPluginSetup, <%= upperCamelCaseName %>PublicPluginStart, AppPluginDependencies } from './types';
import { <%= upperCamelCaseName %>PluginSetup, <%= upperCamelCaseName %>PluginStart, AppPluginDependencies } from './types';
import { PLUGIN_NAME } from '../common';

export class <%= upperCamelCaseName %>PublicPlugin
implements Plugin<<%= upperCamelCaseName %>PublicPluginSetup, <%= upperCamelCaseName %>PublicPluginStart> {
export class <%= upperCamelCaseName %>Plugin
implements Plugin<<%= upperCamelCaseName %>PluginSetup, <%= upperCamelCaseName %>PluginStart> {

public setup(core: CoreSetup): <%= upperCamelCaseName %>PublicPluginSetup {
public setup(core: CoreSetup): <%= upperCamelCaseName %>PluginSetup {
// Register an application into the side navigation menu
core.application.register({
id: '<%= camelCase(name) %>',
Expand Down Expand Up @@ -34,7 +34,7 @@ export class <%= upperCamelCaseName %>PublicPlugin
};
}

public start(core: CoreStart): <%= upperCamelCaseName %>PublicPluginStart {
public start(core: CoreStart): <%= upperCamelCaseName %>PluginStart {
return {};
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { NavigationPublicPluginStart } from '<%= relRoot %>/src/plugins/navigation/public';

export interface <%= upperCamelCaseName %>PublicPluginSetup {
export interface <%= upperCamelCaseName %>PluginSetup {
getGreeting: () => string;
}
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface <%= upperCamelCaseName %>PublicPluginStart {}
export interface <%= upperCamelCaseName %>PluginStart {}

export interface AppPluginDependencies {
navigation: NavigationPublicPluginStart
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { PluginInitializerContext } from '<%= relRoot %>/src/core/server';
import { <%= upperCamelCaseName %>ServerPlugin } from './plugin';
import { <%= upperCamelCaseName %>Plugin } from './plugin';

// These exports are the server side contract for your static code and types.
export function plugin(initializerContext: PluginInitializerContext) {
return new <%= upperCamelCaseName %>ServerPlugin(initializerContext);
return new <%= upperCamelCaseName %>Plugin(initializerContext);
}

export { <%= upperCamelCaseName %>ServerPlugin as Plugin };
export * from '../common';
export {
<%= upperCamelCaseName %>PluginSetup,
<%= upperCamelCaseName %>PluginStart,
} from './types';
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { PluginInitializerContext, CoreSetup, CoreStart, Plugin, Logger } from '
import { <%= upperCamelCaseName %>PluginSetup, <%= upperCamelCaseName %>PluginStart } from './types';
import { defineRoutes } from './routes';

export class <%= upperCamelCaseName %>ServerPlugin
export class <%= upperCamelCaseName %>Plugin
implements Plugin<<%= upperCamelCaseName %>PluginSetup, <%= upperCamelCaseName %>PluginStart> {
private readonly logger: Logger;

Expand All @@ -12,7 +12,7 @@ export class <%= upperCamelCaseName %>ServerPlugin
}

public setup(core: CoreSetup) {
this.logger.debug('<%= name %>: Ssetup');
this.logger.debug('<%= name %>: Setup');
const router = core.http.createRouter();

// Register server side APIs
Expand All @@ -28,5 +28,3 @@ export class <%= upperCamelCaseName %>ServerPlugin

public stop() {}
}

export { <%= upperCamelCaseName %>ServerPlugin as Plugin };

0 comments on commit a9d471b

Please sign in to comment.