README
To install the dependencies -
npm install
To generate sdk and npm module of the sdk -
npm run build
On successfull run of the build command, a dist folder will be generated. The standalone sdk file will be named as follows -
index.standalone.umd.js
To invoke the sdk into project use the following steps -
<script src="<sdk-url>"></script>
<script>
window.zipy.init("<sdk-key>"); //should be a string inside double quotes
</script>
Changes need to be done in rrweb-0.9.14 node_module before building sdk-
Open - zipy-sdk/node_modules/rrweb/es/rrweb/src/record/mutation.js
Update line number 39 by -
else if (n.nextSibling && isNodeInLinkedList(n.nextSibling) && n.nextSibling.__ln.previous) {
Changes need to do for staging build -
Changes in config.json
replace streamMgrUrl with - "https://servicesstaging.zipy.ai/stream-manager/v1/projects/sdk-configurations"
replace ignoreEmptyErros with - false
Changes in sdk-config.json
replace streamUrl with - "https://testcollector.zipy.ai"
How to publish sdk in GCP Bucket -
- Run "npm run build"
- cd dist/
- gzip -k zipy.min.umd.js
- cp zipy.min.umd.js.gzip into zipy.min.umd.js
- Open bucket in which we have to upload sdk
- Upload sdk and map file in buckets
- Change edit metadata of sdk, add content-encoding gzip