README
ecomplus-store-render
Render E-Com Plus store templates with Vue.js 2.
Storefront themes documentation
Browser
Recommended
Include minified bundle via CDN:
<script src="https://cdn.jsdelivr.net/npm/ecomplus-render@3/dist/storefront.min.js"></script>
Standalone
You can include the render standalone, it requires global EcomIo
object from
storefront JS SDK and
Vue:
<script src="https://cdn.jsdelivr.net/npm/ecomplus-render@3/dist/render.min.js"></script>
With bundlers
If using webpack
or browserify
(or relateds),
you can also include the
npm package:
npm install --save ecomplus-render
Server side rendering
The package is also compatible with NodeJS backend, handling SSR with jsdom and Vue SSR.
Even rendered pages must include the render to run on browser, HTML will be updated (hydrate) client-side to keep critical data always up to date.
Command line
cd ecomplus-store-render
node src/index.js https://mystore.com/product > product.html
Node
require('ecomplus-render')(html).then(({ dom, Ecom }) => {
Ecom.init().then(dom => {
// jsdom object
console.log(dom.serialize())
})
})
Developing
Setup the package with NPM:
cd ecomplus-store-render
npm i
Watch tests server:
npm run serve
Update JSDoc files on docs
folder:
npm run doc
Compile to production:
npm run build