vue-medusa
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

vue-medusa

A small wrapper for integrating Medusa to Vuejs

How to install:

CommonJS:

$ yarn add medusa-lib vue-medusa

And in your entry file:

import Vue from 'vue';
import Medusa from 'medusa-lib';
import VueMedusa from 'vue-medusa';
 
Vue.use(VueMedusa, new Medusa({
  url: 'http://localhost:8081/'
}));

Script:

Just add 3 scripts in order: vue, medusa and vue-medusa to your document.

Usage:

This wrapper will bind medusa to Vue or this if you're using single file component.

You can medusa like this:

Vue.medusa.auth({
  username: 'OmgImAlexis',
  password: 'secret!123'
}).then(res => {
  console.log(res.body);
});
 
this.medusa.auth({
  username: 'OmgImAlexis',
  password: 'secret!123'
}).then(res => {
  console.log(res.body);
});```

Package Sidebar

Install

npm i vue-medusa

Homepage

wvvw.me/

Weekly Downloads

2

Version

1.0.0

License

MIT

Unpacked Size

4.77 kB

Total Files

7

Last publish

Collaborators

  • omgimalexis