Vue.js app to render E-Com Plus store template
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist chore: v3.1.1 Feb 18, 2019
docs docs: update documentation (polyfill fixes) Feb 19, 2019
src chore: remove requiring es6-promise (replacing with @babel/promise) Feb 19, 2019
tests test: testing custom method with fn(method, args) Feb 19, 2019
.babelrc build: loading babel polyfill by usage, remove es6-promise Feb 19, 2019
.gitignore starting new version Sep 27, 2018
.npmignore chore: ignore docs on npm Feb 17, 2019
LICENSE Initial commit Jan 24, 2018
README.md
commitlint.config.js chore: starting with commitlint for releases management Feb 14, 2019
package-lock.json build: loading babel polyfill by usage, remove es6-promise Feb 19, 2019
package.json build: loading babel polyfill by usage, remove es6-promise Feb 19, 2019
webpack.build.config.js build: loading babel polyfill by usage, remove es6-promise Feb 19, 2019
webpack.config.js build: add vue-server-renderer and ignore on webpack (node only) Feb 18, 2019

README.md

ecomplus-store-render

CodeFactor npm version license mit

Render E-Com Plus store templates with Vue.js 2.

Storefront theme documentation.

Browser

Recommended

Include minified bundler 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