@techstark/opencv-js 4.8.0-release.2 → 4.8.0-release.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -30,8 +30,17 @@ TypeScript is supported (thanks to `mirada`).
30
30
 
31
31
  - `npm install @techstark/opencv-js`
32
32
  - or `yarn add @techstark/opencv-js`
33
- - `import cv from "@techstark/opencv-js"`
34
- - or `import * as cv from "@techstark/opencv-js"` for Angular
33
+ - `const cv = await import("@techstark/opencv-js");`
34
+ - or wrap it in an async function like
35
+
36
+ ```js
37
+ async function getOpenCv() {
38
+ const cv = await import("@techstark/opencv-js");
39
+ // for development
40
+ window.cv = cv;
41
+ return cv;
42
+ }
43
+ ```
35
44
 
36
45
  # Webpack Configuration (for browser usage)
37
46
 
package/dist/opencv.js CHANGED
@@ -43,7 +43,7 @@ else if (typeof exports === 'object')
43
43
  exports["cv"] = cv;
44
44
 
45
45
  if (typeof Module === 'undefined')
46
- Module = {};
46
+ var Module = {};
47
47
  return cv(Module);
48
48
  }));
49
49
 
@@ -1,12 +1,14 @@
1
1
  diff --git a/dist/opencv.js b/dist/opencv.js
2
- index ec41b85..49c466a 100644
2
+ index 6339212..5befe7a 100644
3
3
  --- a/dist/opencv.js
4
4
  +++ b/dist/opencv.js
5
- @@ -2,4 +2,4 @@
6
- module.exports=cv;else if(typeof define==='function'&&define['amd'])
7
- define([],function(){return cv;});else if(typeof exports==='object')
8
- exports["cv"]=cv;if(typeof Module==='undefined')
9
- -Module={};return cv(Module);}));
10
-
11
- +var Module={};return cv(Module);}));
5
+ @@ -43,7 +43,7 @@ else if (typeof exports === 'object')
6
+ exports["cv"] = cv;
7
+
8
+ if (typeof Module === 'undefined')
9
+ - Module = {};
10
+ + var Module = {};
11
+ return cv(Module);
12
+ }));
13
+
12
14
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@techstark/opencv-js",
3
- "version": "4.8.0-release.2",
3
+ "version": "4.8.0-release.3",
4
4
  "description": "OpenCV JavaScript version for node.js or browser",
5
5
  "main": "dist/opencv.js",
6
6
  "types": "dist/types/index.d.ts",