{"_id":"@bounteous/shopkit","_rev":"3-9efe5b237c303e12f18e579c9aba9e02","name":"@bounteous/shopkit","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@bounteous/shopkit","version":"0.0.1","description":"Embeddable Moltin Cart + Checkout","main":"dist/index.js","repository":{"type":"git","url":"git+https://github.com/bounteous/shopkit.git"},"scripts":{"dev":"webpack-dev-server","deploy":"now --target=production","build":"webpack","now-build":"webpack --mode=production"},"keywords":["moltin","buy button","embeddable cart"],"author":{"name":"Jamie Barton","email":"jamie@notrab.dev"},"license":"MIT","dependencies":{"@moltin/request":"2.0.0","algolia-places-react":"1.4.1","arrive":"2.4.1","easy-peasy":"2.1.6","final-form":"4.12.0","react":"16.8.6","react-dom":"16.8.6","react-final-form":"4.1.0","react-stripe-elements":"2.0.3","styled-components":"4.2.0"},"devDependencies":{"@babel/core":"7.4.5","@babel/plugin-proposal-class-properties":"7.4.4","@babel/preset-env":"7.4.5","@babel/preset-react":"7.0.0","babel-loader":"8.0.6","babel-plugin-styled-components":"1.10.0","css-loader":"2.1.1","mini-css-extract-plugin":"0.6.0","optimize-css-assets-webpack-plugin":"5.0.1","prop-types":"15.7.2","terser-webpack-plugin":"1.3.0","webpack":"4.30.0","webpack-cli":"3.3.2","webpack-dev-server":"3.3.1","webpack-obfuscator":"0.18.0"},"publishConfig":{"access":"public"},"gitHead":"19705dd76ac2ce37d9838051c46a70fd2c0a6b63","bugs":{"url":"https://github.com/bounteous/shopkit/issues"},"homepage":"https://github.com/bounteous/shopkit#readme","_id":"@bounteous/shopkit@0.0.1","_nodeVersion":"13.6.0","_npmVersion":"6.13.4","dist":{"integrity":"sha512-izMK9UU1vAyqc6f/60kvu0f23tmdBG1BkeRv1fcSxsmqiZ6jsdIIAHS6O5XKRDCC+2UrKUdxRPVIWP5MIv4iNA==","shasum":"1ab797d202533ab0f94b3a83b90c491efba43630","tarball":"https://registry.npmjs.org/@bounteous/shopkit/-/shopkit-0.0.1.tgz","fileCount":3,"unpackedSize":457016,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJeQzi5CRA9TVsSAnZWagAAuhEP/0u27wqZ4V/KrjlqYSw+\nahxgr6GInATEYgwsj8POjCAwRnwZRl51/aNp2309B2/3VHzEpMHSb1syw5wX\n2E9afe7MnjL1vJZ1qC+U1uMdzjSCqHlrDstbTY9BUwiHxbTCED2gPH6SaUOX\n22YMSwDN8EXJL2U0FwBaBC98I6t+YX74bkZAeyWLSdhFiaqeU1wC504TDe+z\n0xWBwjiOtypLTrvw5QrfptDpIIx8PZDPuUMNF0T8cViqedPj+8W0TfbaNO6a\nGgRcDTd7FVptlaMs3wTPkLBZqgPHg693TEGFp/1IwRykmMeadan/rBGoMvrQ\njbvdRlqYh93QvePg5krl0Tw3YymEG/52ykW5tEEjLxXXcWYdjTNsgRJURgKx\nAmSR6BI89HmDtGkQpOTPFR2YY7jFcNmKfoYHoVeRUGPwzOWZkwPMdoSXNYjk\npGKsjhe4p89HNqAdUWRkD02AjYoSR80Ahp5EUVuROPcR9XMB0Vsc/J7rrGnx\n7NP8pl7kss33vUyi3BLLMOIdXdIVtQdtnR58/GHaclFYdo7mIcXh5Q8WQ3ZL\neyDxR54n1l+rlLsH7M3+x4q5zNjMLJUkouF5tir/jDwexn+R2pS7yWNQYSCQ\nsiSP/Xz5XVNlkPYK6AHGCT7hJeZ717BGxFawXw46QhstIi4V3flxqvtUnkWh\nsSxO\r\n=gq06\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIB27qw6TcXebGM37R7ODgWbUrIIcx4OBAT9cw03tF/iJAiEAnF5/bD0cAYYUY4RPvq2oUinCXNp01XmZxSgVcotdb+I="}]},"maintainers":[{"name":"visnaut","email":"desk@visnaut.com"}],"_npmUser":{"name":"visnaut","email":"desk@visnaut.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/shopkit_0.0.1_1581463737203_0.05598367347564848"},"_hasShrinkwrap":false}},"time":{"created":"2020-02-11T23:28:56.709Z","0.0.1":"2020-02-11T23:28:57.331Z","modified":"2022-04-04T20:16:08.913Z"},"maintainers":[{"email":"paul.rohrbeck@bounteous.com","name":"prohrbeck"},{"email":"desk@visnaut.com","name":"visnaut"},{"email":"catrina.ahlbach@bounteous.com","name":"cahlbach"}],"description":"Embeddable Moltin Cart + Checkout","homepage":"https://github.com/bounteous/shopkit#readme","keywords":["moltin","buy button","embeddable cart"],"repository":{"type":"git","url":"git+https://github.com/bounteous/shopkit.git"},"author":{"name":"Jamie Barton","email":"jamie@notrab.dev"},"bugs":{"url":"https://github.com/bounteous/shopkit/issues"},"license":"MIT","readme":"# Moltin Embeddable Cart + Checkout\n\n> A buy button, a cart, a checkout, a customer login. All without writing a single line of JavaScript!\n\n[Read more about Shopkit](https://www.moltin.com/commerce-solutions/embeddable-cart)\n\n## Installation\n\nYou can use Shopkit anywhere you can insert custom HTML.\n\n### Step 1\n\nFirst, you'll need to enable Stripe as a payment gateway via the [Dashboard UI](https://dashboard.moltin.com/app/settings/gateways/stripe) or [API](https://docs.moltin.com/api/payments/gateways/configure-stripe) directly.\n\nYou'll find your Stripe `publishable key` and `secret key` via the [Stripe Dashboard](https://dashboard.stripe.com).\n\n**Shopkit only works with Stripe during BETA.**\n\n### Step 2\n\nAdd the following snippet before the `</body>` tag on your website to enable Shopkit. You'll want to populate your Moltin `client id` and Stripe `publishable key` here.\n\n```html\n<script\n  src=\"https://btn.moltin.com\"\n  data-moltin-client-id=\"...\"\n  data-moltin-stripe-publishable-key=\"...\"\n></script>\n```\n\n### Step 3\n\nAdd a Cart button with the following code:\n\n```html\n<span class=\"moltin-cart-button\"></span>\n```\n\nYou can change the buttons behaviour with additional properties.\n\n### Step 4\n\nAdd a Buy button with the following code:\n\n```html\n<span class=\"moltin-buy-button\" data-moltin-product-id=\"...\"></span>\n```\n\nYou can change the buttons behaviour with additional properties. You can also use the button with a custom product outside of Moltin.\n\n## Buy Button\n\nYou can add as many Buttons to your website as you like. All you need is:\n\n```html\n<span class=\"moltin-cart-button\" data-moltin-product-id=\"...\"></span>\n```\n\n### Text\n\nThe default text for a button is `Add to Cart`. You can change the default text by providing a `data-moltin-text=\"Add to Basket\"` attribute to your button.\n\n#### Example\n\n```html\n<span\n  class=\"moltin-buy-button\"\n  data-moltin-product-id=\"...\"\n  data-moltin-text=\"Add to Basket\"\n></span>\n```\n\n### Open cart on click\n\nThe default behaviour when clicking on a button is to silently add the items to the cart and update the cart button total.\n\nYou can automatically open the cart once an item has been added by providing a `data-moltin-open-cart=\"true\"` attribute to your button.\n\n#### Example\n\n```html\n<span\n  class=\"moltin-buy-button\"\n  data-moltin-product-id=\"...\"\n  data-moltin-open-cart=\"true\"\n></span>\n```\n\n### Custom item\n\nYou can add custom items to the cart that don't belong inside your Moltin catalog.\n\nSimply omit the `data-moltin-product-id` attribute and add all of the following attributes:\n\n```html\n<span\n  class=\"moltin-buy-button\"\n  data-moltin-type=\"custom\"\n  data-moltin-product-name=\"T-Shirt\"\n  data-moltin-product-sku=\"unique-sku-here\"\n  data-moltin-product-price=\"1000\"\n></span>\n```\n\n## Cart button\n\nYou can add as many cart buttons to your page. All you need is:\n\n```html\n<span class=\"moltin-cart-button\"></span>\n```\n\n### Text\n\nThe default text for a cart button is `Cart`. You can change the default text by providing a `data-moltin-text=\"Basket\"` attribute to your button.\n\n#### Example\n\n```html\n<span class=\"moltin-cart-button\" data-moltin-text=\"Basket\"></span>\n```\n\n### Show total\n\nBy default the cart button shows the number of items in the cart alongside the text defined above. You can change this behaviour by providing a `data-moltin-show-total=\"true\"` attribute to your button.\n\n#### Example\n\n```html\n<span class=\"moltin-cart-button\" data-moltin-show-total=\"true\"></span>\n```\n\n## Global configuration\n\n### Override styles\n\nBy default Shopkit ships with a blue theme. You can change the colours by overriding the CSS classes.\nSomewhere in your `<head>` you will want to add the following:\n\n```html\n<style>\n  .shopkit-primary {\n    background: orange !important;\n  }\n  .shopkit-primary-text {\n    color: orange !important;\n  }\n</style>\n```\n\n## Contributing\n\n1. Clone repo\n2. Use `yarn` to install dependencies\n3. Run `yarn dev` and webpack will open `example/index.html`\n\nThe example playground uses the `demo.moltin.com` API keys.\n\n## Publishing\n\nShopkit versioning is based on semver and the angular commit convention. Releasing is automatically triggered by semantic-release.\n\nWe should recommend users use the specific version `unpkg` url, e.g. `https://unpkg.com/@moltin/shopkit@1.0.0/index.js`.\n\nYou can optionally deploy to `btn.moltin.com` which should be used for those wanting to develop on master. You can deploy by running `yarn deploy`.\n","readmeFilename":"README.md"}