Example PWAjet extension for CS-Cart and Multi-Vendor
Start your extension with this scaffold.
- Eslint configured the same way as a PWAjet
- Typescript
- Jest
- React testing library
- rollup
- postcss
- babel
- and much more to best coding experience
- Once you have a PWAjet installed, get all its content from the root directory (yes - just compiled statics)
- Create
public
folder at the root of your extension project - Copy all files from 1. to
public
- Set up name, company name and version at
package.json
- name should start with
pwajet-
prefix. Likepwajet-sd-labels
.
- name should start with
- Run
yarn
andyarn start
- Done!
- Remove unnecessary or install extra dependencies. You may see current ones at
package.json
- Subscribe to a render event or register your screen/block/payment
PWAjet has shared API, which is described by pwajet.d.ts
. Make sure you're using actual version that meets the version of a PWAjet.
Development mode allows you to test your extension right at PWAjet like extension already installed: html-webpack-plugin inserts extension's script to index.html (PWAjet entry point)
But extension builds as a pure js and css assets for production.
After yarn build
complete, extension under the build
directory can be described as:
All emitted assets will be placed to /assets/extensions/extension-developer-name/extension-name/
After build you can find INSTRUCTION.md
at your build path /assets/extensions/extension-developer-name/extension-name/