@graffiti-garden/wrapper-vue-personal-data
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Graffiti Personal Data

A Vue component for reading and writing personal information using the Graffiti API. Inspired by the madata Vue component.

Read the API documentation.

Installation

You must install this package along with Vue.js, an implementation of the Graffiti API, and the Graffiti Vue wrapper. In this example, we will use the local implementation of the Graffiti API, but any other would be similar. In node.js, simply install them with npm:

npm install vue
npm install @graffiti-garden/implementation-local
npm install @graffiti-garden/wrapper-vue
npm install @graffiti-garden/wrapper-vue-personal-data

In the browser, you can use a CDN like jsDelivr. Add an import map the the <head> of your HTML file:

<head>
    <script type="importmap">
        {
            "imports": {
                "vue": "https://cdn.jsdelivr.net/npm/vue/dist/vue.esm-browser.js",
                "@graffiti-garden/implementation-local": "https://cdn.jsdelivr.net/npm/@graffiti-garden/implementation-local/dist/index.browser.js",
                "@graffiti-garden/wrapper-vue": "https://cdn.jsdelivr.net/npm/@graffiti-garden/wrapper-vue/dist/plugin.mjs"
                "@graffiti-garden/wrapper-vue-personal-data": "https://cdn.jsdelivr.net/npm/@graffiti-garden/wrapper-vue-personal-data/dist/plugin.mjs"
            }
        }
    </script>
</head>

In ether case install the plugin in your Vue app as follows:

import { createApp } from "vue";
import { GraffitiLocal } from "@graffiti-garden/implementation-local";
import { GraffitiPlugin } from "@graffiti-garden/wrapper-vue";
import { GraffitiPersonalDataPlugin } from "@graffiti-garden/wrapper-vue-personal-data";

createApp({})
  .use(GraffitiPlugin, {
    graffiti: new GraffitiLocal(),
  })
  .use(GraffitiPersonalDataPlugin);
  .mount("#app");

See a live example.

Readme

Keywords

none

Package Sidebar

Install

npm i @graffiti-garden/wrapper-vue-personal-data

Weekly Downloads

1

Version

0.0.3

License

GPL-3.0-or-later

Unpacked Size

32.8 kB

Total Files

12

Last publish

Collaborators

  • graffiti-garden