@biz-storefront/checkout
v2.0.86-alpha.0
Published
```javascript import Vue from 'vue' import Router from 'vue-router' import Vuex from 'vuex' import checkout from 'https://cdn.loja.biz/storefront/checkout.js' import addToCart from 'https://cdn.loja.biz/storefront/add-to-cart.js'
Downloads
266
Readme
checkout
import Vue from 'vue'
import Router from 'vue-router'
import Vuex from 'vuex'
import checkout from 'https://cdn.loja.biz/storefront/checkout.js'
import addToCart from 'https://cdn.loja.biz/storefront/add-to-cart.js'
Vue.use(Vuex)
Vue.use(Router)
const router = new Router(routes)
const store = new Vuex.Store(Store)
class CheckoutApp extends HTMLElement {
constructor(){
super()
this.appendChild(document.createElement('div').setAttribute('id', 'checkout'))
const app = new Vue({
router,
store,
render: h => h(App)
}).$mount('#checkout')
}
}
class AddToCart extends HTMLElement {
constructor(){
super()
const app = new Vue({
router,
store,
render: h => h(App)
}).$mount(this)
}
}
window.customElements.define('checkout-app', CheckoutApp);
<header>
<checkout-app></checkout-app>
</header>
<main>
<button is="cartAddable"></button>
</main>
Project setup
npm install
Compiles and hot-reloads for development
npm run serve
Compiles and minifies for production
npm run build
Run your tests
npm run test
Lints and fixes files
npm run lint
Run your end-to-end tests
npm run test:e2e