dynamsoft-barcode-reader-bundle 10.2.1000-beta-202405060124

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/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "dynamsoft-barcode-reader-bundle",
3
+ "version": "10.2.1000-beta-202405060124",
4
+ "description": "Dynamsoft Barcode Reader JS is a recognition SDK which enables you to embed barcode reading functionality in your web, desktop, and mobile applications. With a few lines of JavaScript code, you can develop a robust application to scan a linear barcode, QR Code, DaraMatrix, PDF417, and Aztec Code.",
5
+ "main": "./dist/dbr.bundle.js",
6
+ "scripts": {
7
+ "build": "rollup -c --environment BUILD:production",
8
+ "test": "echo \"Error: no test specified\" && exit 1",
9
+ "update:readme": "updateReadme --package=dynamsoft-barcode-reader-bundle --version=latest --branch=preview --html",
10
+ "updateLink:npm": "updateLink --source=npm",
11
+ "updateLink:zip": "updateLink --source=zip",
12
+ "updateLink:github": "updateLink --source=github",
13
+ "update:prod": "updatePackage --package=dynamsoft-barcode-reader-bundle --version=auto --env=production --tag=latest",
14
+ "update:beta": "updatePackage --package=dynamsoft-barcode-reader-bundle --version=auto --env=beta --tag=beta",
15
+ "update:iv": "updatePackage --package=dynamsoft-barcode-reader-bundle --version=auto --env=internalVersion --tag=iv",
16
+ "update:dev": "updatePackage --package=dynamsoft-barcode-reader-bundle --version=auto --env=development --tag=latest"
17
+ },
18
+ "keywords": [
19
+ "HTML5 barcode",
20
+ "JavaScript barcode",
21
+ "Web barcode",
22
+ "barcode",
23
+ "PDF417",
24
+ "QRCode",
25
+ "Aztec Code",
26
+ "WebAssembly",
27
+ "SDK",
28
+ "Linear barcode",
29
+ "1D barcode"
30
+ ],
31
+ "author": {
32
+ "name": "Dynamsoft",
33
+ "url": "https://www.dynamsoft.com"
34
+ },
35
+ "publishConfig": {
36
+ "registry": "https://registry.npmjs.org/",
37
+ "tag": "beta"
38
+ },
39
+ "license": "SEE LICENSE IN LICENSE",
40
+ "repository": {
41
+ "type": "git",
42
+ "url": "https://github.com/dynamsoft/barcode-reader-javascript.git"
43
+ },
44
+ "maintainers": [
45
+ {
46
+ "name": "Dynamsoft",
47
+ "email": "support@dynamsoft.com"
48
+ }
49
+ ],
50
+ "devDependencies": {
51
+ "@dynamsoft/rd2-scripts": "0.1.18",
52
+ "@rollup/plugin-node-resolve": "^15.2.3",
53
+ "@rollup/plugin-replace": "^5.0.5",
54
+ "@rollup/plugin-terser": "^0.4.4",
55
+ "@rollup/plugin-typescript": "^11.1.6",
56
+ "@scannerproxy/curscript-path": "^2.0.1",
57
+ "rollup": "^3.29.3",
58
+ "rollup-plugin-dts": "^6.1.0",
59
+ "tslib": "^2.6.2",
60
+ "typescript": "^4.9.5"
61
+ },
62
+ "dependencies": {
63
+ "dynamsoft-barcode-reader": "10.2.10",
64
+ "dynamsoft-camera-enhancer": "4.0.2",
65
+ "dynamsoft-capture-vision-router": "2.2.10",
66
+ "dynamsoft-core": "3.2.10",
67
+ "dynamsoft-license": "3.2.10",
68
+ "dynamsoft-utility": "1.2.10"
69
+ }
70
+ }
@@ -0,0 +1,72 @@
1
+ import fs from "fs";
2
+ import typescript from "@rollup/plugin-typescript";
3
+ import terser from "@rollup/plugin-terser";
4
+ // import replace from "@rollup/plugin-replace";
5
+ import { nodeResolve } from "@rollup/plugin-node-resolve";
6
+ // import { dts } from "rollup-plugin-dts";
7
+
8
+ import pkg from "./package.json" assert { type: "json" };
9
+ const version = pkg.version;
10
+
11
+ fs.rmSync("dist", { recursive: true, force: true });
12
+ // fs.cpSync("public", "dist", { recursive: true });
13
+
14
+ const strProduct = 'Dynamsoft Barcode Reader JS Edition Bundle';
15
+
16
+ const terser_format = {
17
+ // this func is run by eval in worker, so can't use variable outside
18
+ comments: function (node, comment) {
19
+ const text = comment.value;
20
+ const type = comment.type;
21
+ if (type == "comment2") {
22
+ // multiline comment
23
+ const strProduct = 'Dynamsoft Barcode Reader JS Edition Bundle';
24
+ const regDyComment = new RegExp(String.raw`@product\s${strProduct}`,'i');
25
+ return regDyComment.test(text);
26
+ }
27
+ },
28
+ };
29
+
30
+ const banner = `/*!
31
+ * Dynamsoft JavaScript Library
32
+ * @product ${strProduct}
33
+ * @website http://www.dynamsoft.com
34
+ * @copyright Copyright ${new Date().getUTCFullYear()}, Dynamsoft Corporation
35
+ * @author Dynamsoft
36
+ * @version ${version}
37
+ * @fileoverview Dynamsoft JavaScript Library for Barcode Reader
38
+ * More info on dbr JS: https://www.dynamsoft.com/barcode-reader/docs/web/programming/javascript/
39
+ */`;
40
+
41
+ // const plugin_terser_es6 = terser({ ecma: 6, format: terser_format });
42
+ const plugin_terser_es5 = terser({ ecma: 5, format: terser_format });
43
+
44
+ export default [
45
+ {
46
+ input: "src/dbr.bundle.ts",
47
+ plugins: [
48
+ nodeResolve({ browser: true }),
49
+ typescript({
50
+ tsconfig: "./tsconfig.json",
51
+ declaration: false,
52
+ declarationDir: undefined
53
+ }),
54
+ plugin_terser_es5,
55
+ // replace({
56
+ // preventAssignment: true,
57
+ // values: {
58
+ // "process.env.npm_package_version": JSON.stringify(version),
59
+ // },
60
+ // }),
61
+ ],
62
+ output: [
63
+ {
64
+ file: "dist/dbr.bundle.js",
65
+ format: "umd",
66
+ name: "Dynamsoft",
67
+ banner: banner,
68
+ exports: "named",
69
+ }
70
+ ],
71
+ },
72
+ ];