Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/s-kainet/vue-pnpjs

Vue.js and PnP.js integration plugin
https://github.com/s-kainet/vue-pnpjs

Last synced: about 10 hours ago
JSON representation

Vue.js and PnP.js integration plugin

Awesome Lists containing this project

README

        

# 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(...)
```