4.0.0 • Published 3 months ago

@tanglemedia/svelte-starter-marker-io v4.0.0

Weekly downloads
-
License
MIT
Repository
-
Last release
3 months ago

@tanglemedia/svelte-starter-marker-io

This package is experimental and is meant for internal use only.

This intergrate marker io automatically into your application. Note that this plugin only works with @tanglemedia/svelte-starter-core >= 0.1.1 and above.

Getting started

Start by creating a new project in https://app.marker.io/ to obtain your project id.

To enable make sure your issue.yml has the following configuration

default: markerio

enable: true

providers:
  markerio:
    project: <project-id>

default needs to be set to markerio and enable must also be true.

Installation

Install the @tanglemedia/svelte-starter-marker-io with your favorite package manager.

pnpm add @tanglemedia/svelte-starter-marker-io --filter=my-project

Register the plugin

Within your application boot or where you invoke the createApplication function, register the markerio plugin.

import { createApplication } from '@tanglemedia/svelte-starter-core';
import { markerIO } from '@tanglemedia/svelte-starter-marker-io';

createApplication({
	application: {
		// append markerIO to the plugin array
		plugin: [markerIO]
	}
	// ... your other configurations
});

Make sure you are using ApplicationProvider from @tanglemedia/svelte-starter-core some where in your top level layout.

Usage

The plugin uses svelte setContext api to register the marker sdk as a writable store. There is a convenience function for accessing this context. This is only accessible via svelte components that are children on the ApplicationProvider.

<script lang="ts">
	import { getMarkerSDK, getCustomData, getReporter } from '@tanglemedia/svelte-starter-marker-io';

	const sdk = getMarkerSDK();

	$sdk?.show();

	const customData = getCustomData();
	const reporter = getReporter();

	$customData = { foo: 'bar' };

	$reporter = {
		email: 'test@example.com',
		fullName: 'John Doe'
	};
</script>

For mode demos and to check out all the components, please visit our documentation website

4.0.0

3 months ago

3.0.1

5 months ago

3.0.0

5 months ago

2.0.0

7 months ago

1.0.0

9 months ago

0.1.0

10 months ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago