2021-12-07 01:11:18 +01:00
|
|
|
|
|
|
|
|
import { App } from 'vue';
|
|
|
|
|
import { ZeroRuntime, ZeroInstallOptions } from './index';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
export function createZeroPlugin(options?: ZeroInstallOptions)
|
|
|
|
|
{
|
|
|
|
|
return {
|
|
|
|
|
install: (app: App) =>
|
|
|
|
|
{
|
|
|
|
|
const zero = new ZeroRuntime(app, options);
|
|
|
|
|
app.config.globalProperties.zero = zero;
|
|
|
|
|
|
2021-12-07 15:59:29 +01:00
|
|
|
zero.useZero();
|
|
|
|
|
zero.usePlugins();
|
|
|
|
|
zero.useRouter();
|
2021-12-07 01:11:18 +01:00
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|