Skip to content

Commit

Permalink
chore: build plugins
Browse files Browse the repository at this point in the history
  • Loading branch information
codebender828 committed Feb 21, 2022
1 parent db750e7 commit 8e22d74
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/chilled-singers-impress.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@axiajs/solana.vue': minor
---

Export plugin
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@axiajs/utils": "0.0.0"
},
"changesets": [
"chilled-singers-impress",
"yellow-rabbits-divide"
]
}
6 changes: 6 additions & 0 deletions packages/solana/vue/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @axiajs/solana.vue

## 0.1.0-alpha.1

### Minor Changes

- Export plugin

## 0.1.0-alpha.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/solana/vue/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@axiajs/solana.vue",
"version": "0.1.0-alpha.0",
"version": "0.1.0-alpha.1",
"description": "Vue composables for Mirage SDK",
"keywords": [
"mirage",
Expand Down
1 change: 1 addition & 0 deletions packages/solana/vue/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from './utils';
export * from './composables';
export { default as AxiaSolana } from './solana.plugin';
20 changes: 20 additions & 0 deletions packages/solana/vue/src/solana.plugin.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { App, Plugin } from 'vue';
import {
ConnectionInjectionKey,
initializeConnection,
SolanaNetworks,
} from './composables';

export interface AxiaSolanaPluginOptions {
network: SolanaNetworks;
}

const AxiaSolanaPlugin: Plugin = {
install(app: App, options: AxiaSolanaPluginOptions) {
// Create new connection instance
const connection = initializeConnection(options.network);
app.provide(ConnectionInjectionKey, connection);
},
};

export default AxiaSolanaPlugin;

0 comments on commit 8e22d74

Please sign in to comment.