svelte-marina-button
v0.1.4
Published
## Install
Downloads
1
Readme
Marina Connect button component for Svelte
Install
npm install -S svelte-marina-button
// or with yarn
yarn add svelte-marina-button
Example
Add to your svelte app
import Connect, { marinaStore, MarinaStore } from 'svelte-marina-button';
// You can subscribe to marina status changes
marinaStore.subscribe((s: MarinaStore) => {
console.log(s.network);
console.log(s.installed);
});
// you can pass optional cssClass to style your button
<Connect cssClass={'special-button-css'} />;
Developing
Test the library with an example page
yarn dev
# or start the server and open the app in a new browser tab
yarn dev -- --open
Building
Before creating a production version of your app, install an adapter for your target environment. Then:
yarn build
You can preview the built app with
yarn preview
, regardless of whether you installed an adapter. This should not be used to serve your app in production.
Release
- Increment the version and commit
npm version patch
- Package the library
npm run package
Now you can publish to NPM registry entering the package
folder and running npm publish