UNPKG

vue-pnpjs

Version:

Provides integration between Vue.js and PnP.js

28 lines (23 loc) 627 B
# Vue.js and PnP.js integration plugin ## How to use 1. Install the plugin: ```bash npm install vue-pnpjs ``` 2. Initialize it in your main file: ```typescript import Vue from 'vue'; import VuePnP from 'vue-pnpjs'; import { sp } from '@pnp/sp'; import { graph } from '@pnp/graph'; import { setup } from '@pnp/common'; setup({...}) Vue.use(VuePnP, { sp: sp, graph: graph }); ``` 3. Use it in your Vue instances: ```typescript this.$pnp.sp.web.get().then(...) ```