|
1 |
| -# Demo for Dynamsoft Barcode Reader JavaScript SDK |
2 |
| - |
3 |
| -This repository contains the source code for the official demo of the Dynamsoft Barcode Reader JavaScript SDK (hereafter called "the library"). |
4 |
| - |
5 |
| -You can visit the official demo at [https://demo.dynamsoft.com/barcode-reader-js/](https://demo.dynamsoft.com/barcode-reader-js/). |
6 |
| - |
7 |
| -The application is based on [Vue](https://vuejs.org/), a progressive framework for building user interfaces. You can follow the steps below to run the application. |
8 |
| - |
9 |
| -> Make sure you have [node](https://nodejs.org/), [yarn](https://yarnpkg.com/cli/install) and [Vue CLI](https://cli.vuejs.org/) installed. `node 14.16.0` , `yarn 1.22.10` and `@vue/cli 4.5.11` are used in the example below. |
10 |
| -
|
11 |
| -## Install the dependencies |
| 1 | +# dbr_js_demo_vue |
12 | 2 |
|
| 3 | +## Project setup |
13 | 4 | ```
|
14 |
| -yarn |
| 5 | +npm install |
15 | 6 | ```
|
16 | 7 |
|
17 |
| -## Compile and serve |
18 |
| - |
| 8 | +### Compiles and hot-reloads for development |
19 | 9 | ```
|
20 |
| -yarn serve |
| 10 | +npm run serve |
21 | 11 | ```
|
22 | 12 |
|
23 |
| -You will notice that the barcode results are not complete and sometimes the location is not accurate, both issues are due to the lack of a valid license. The next step shows you how to apply for a trial license and use it. |
24 |
| - |
25 |
| -## License the application |
26 |
| - |
27 |
| -Sign up and request a trial license in the [Dynamsoft Customer Portal](https://www.dynamsoft.com/customer/license/trialLicense). Make sure to choose "Dynamsoft Barcode Reader" and "JavaScript Web SDK". |
28 |
| - |
29 |
| -Once you get the trial license, you can use it by specifying your organization ID in the application. |
30 |
| - |
31 |
| -Open the file "/src/dbr.js" and specify your organization ID like this: |
32 |
| - |
33 |
| -```javascript |
34 |
| -DBR.BarcodeReader.organizationID = "Your-Organization-ID"; |
| 13 | +### Compiles and minifies for production |
| 14 | +``` |
| 15 | +npm run build |
35 | 16 | ```
|
36 | 17 |
|
37 |
| -That's it. Recompile to test again and you will see the barcode reading working properly. |
| 18 | +### Lints and fixes files |
| 19 | +``` |
| 20 | +npm run lint |
| 21 | +``` |
38 | 22 |
|
39 |
| -> NOTE |
40 |
| -> |
41 |
| -> The trial license is fetched from Dynamsoft License Server at runtime, so please make sure your device has network connection. |
| 23 | +### Customize configuration |
| 24 | +See [Configuration Reference](https://cli.vuejs.org/config/). |
0 commit comments