Affiliates dashboard
This repository contains the code of a Vue app bundled as an installable plugin from npm.
Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 <script setup>
SFCs, check out the script setup docs to learn more.
RFC
https://docs.google.com/document/d/18z9dX3NaaV23x8_qmUBRTKj3vsL_LRTeaoF2wWeelYk/edit#
Installation
npm install @dp-websolutions/affiliates-dashboard
Usage
This module will automatically register a Web Component once the main script is loaded into the page.
You can load this module in different ways:
Load the script directly into a page
<script src="node_modules/@dp-websolutions/affiliates-dashboard/affiliates-dashboard.umd.js"></script>
In a compilation step, that will later generate a javascript bundle and loaded into a page
require('@dp-websolutions/affiliates-dashboard')
Using imports
import '@dp-websolutions/affiliates-dashboard'
After importing the script of this module, an html tag will be available: <affiliates-dashboard>
This tag requires a config
attribute to be passed like so:
<affiliates-dashboard config='{"key": "value"}'></affiliates-dashboard>
Config
The configuration object passed to this component should provide the following:
...Work In Progress...
{}
Development
To develop locally, clone the repository and run the following commands from within the directory
npm run install
npm run dev
Publish to npm
There's a bash script to publish to npm for convenience.
Run: ./scripts/publish.sh