From f2f263d8336e1cbeb0a2cb5bb1e1d239289346b5 Mon Sep 17 00:00:00 2001 From: Braks <78412429+bcakmakoglu@users.noreply.github.com> Date: Sat, 10 Jul 2021 15:59:37 +0200 Subject: [PATCH] update: more bundle stuff --- src/index.ts | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/index.ts b/src/index.ts index 06369387..49083c54 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,5 +1,5 @@ import RevueFlow from './container/RevueFlow'; -import { App, inject, InjectionKey } from 'vue-demi'; +import { App } from 'vue-demi'; export default RevueFlow; @@ -37,21 +37,11 @@ export interface RevueFlowPlugin { install(app: App): void; } -export const RevueFlowPluginSymbol: InjectionKey = Symbol(); - -export function RevueFlowPlugin(): RevueFlowPlugin { - const RevueFlowPlugin = inject(RevueFlowPluginSymbol); - if (!RevueFlowPlugin) throw new Error('No RevueFlowPlugin provided.'); - - return RevueFlowPlugin; -} - -export function createVueCounterPlugin(options?: RevueFlowOptions): RevueFlowPlugin { +export function createRevueFlowPlugin(options?: RevueFlowOptions): RevueFlowPlugin { return { options, install(app: App) { app.component('revue-flow', RevueFlow); - app.provide(RevueFlowPluginSymbol, this); } }; }