feat: update the templates to default to named exports for new plugins

This commit is contained in:
blam
2020-04-09 04:37:15 +02:00
parent 0d27c0dfda
commit e805eafa42
6 changed files with 6 additions and 6 deletions
@@ -1 +1 @@
export { default } from './plugin';
export { plugin } from './plugin';
@@ -1,4 +1,4 @@
import plugin from './plugin';
import { plugin } from './plugin';
describe('welcome', () => {
it('should export plugin', () => {
@@ -1,7 +1,7 @@
import { createPlugin } from '@backstage/core';
import WelcomePage from './components/WelcomePage';
export default createPlugin({
export const plugin = createPlugin({
id: 'welcome',
register({ router }) {
router.registerRoute('/', WelcomePage);
@@ -14,4 +14,4 @@
* limitations under the License.
*/
export { default } from './plugin';
export { plugin } from './plugin';
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import plugin from './plugin';
import { plugin } from './plugin';
describe('{{ id }}', () => {
it('should export plugin', () => {
@@ -17,7 +17,7 @@
import { createPlugin } from '@backstage/core';
import ExampleComponent from './components/ExampleComponent';
export default createPlugin({
export const plugin = createPlugin({
id: '{{ id }}',
register({ router }) {
router.registerRoute('/{{ id }}', ExampleComponent);