Skip to content

Commit da263a8

Browse files
authored
Merge pull request #55 from Keillion/master
add #install in README.md
2 parents d06df8d + 159eabd commit da263a8

File tree

2 files changed

+45
-13
lines changed

2 files changed

+45
-13
lines changed

README.md

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,28 @@
1111

1212
> Also see [Dynamsoft JavaScript Barcode SDK for Node](https://github.com/dynamsoft-dbr/node-javascript-barcode).
1313
14-
## Quick Usage
14+
## Install
1515

16-
### Web
16+
yarn
17+
```
18+
$ yarn add dynamsoft-javascript-barcode
19+
```
20+
21+
node
22+
```
23+
$ node install dynamsoft-javascript-barcode --save
24+
```
25+
26+
cdn
27+
```html
28+
<script src="https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
29+
<!-- or -->
30+
<script src="https://unpkg.com/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js" data-productKeys="PRODUCT-KEYS"></script>
31+
```
32+
33+
[Download zip](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js)
34+
35+
## Quick Usage
1736

1837
```html
1938
<!DOCTYPE html>
@@ -33,6 +52,12 @@
3352
</html>
3453
```
3554

55+
[Vue example](./example/web/vue)
56+
57+
[React example](./example/web/react)
58+
59+
[Angular example](./example/web/angular)
60+
3661
<!--
3762
### Node
3863
@@ -53,6 +78,7 @@ Dynamsoft.BarcodeReader.productKeys = 'PRODUCT-KEYS';
5378
-->
5479

5580
## Table of Contents
81+
- [Install](#install)
5682
- [Quick Usage](#quick-usage)
5783
- [Features](#features)
5884
- [Live Demo](#live-demo)
@@ -588,9 +614,7 @@ For commercial usage, we highly recommend self-hosted deployment. The following
588614
* **Step one**: Place the files
589615

590616

591-
On your server put the following files in the same directory.
592-
593-
> [Download zip](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js) to get these files.
617+
On your server put the following files in the same directory. You can get them in `dist/`.
594618

595619
```
596620
dbr.js // For <script>

doc/api reference/index.html

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,19 @@ <h1>Dynamsoft JavaScript Barcode SDK for Web</h1>
7272
<blockquote>
7373
<p>Also see <a href="https://github.com/dynamsoft-dbr/node-javascript-barcode">Dynamsoft JavaScript Barcode SDK for Node</a>.</p>
7474
</blockquote>
75+
<a href="#install" id="install" style="color: inherit; text-decoration: none;">
76+
<h2>Install</h2>
77+
</a>
78+
<p>yarn</p>
79+
<pre><code>$ yarn <span class="hljs-keyword">add</span><span class="bash"> dynamsoft-javascript-barcode</span></code></pre><p>node</p>
80+
<pre><code>$ <span class="hljs-keyword">node</span> <span class="hljs-title">install</span> dynamsoft-javascript-barcode --save</code></pre><p>cdn</p>
81+
<pre><code class="language-html"><span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://cdn.jsdelivr.net/npm/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js"</span> <span class="hljs-attr">data-productKeys</span>=<span class="hljs-string">"PRODUCT-KEYS"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
82+
<span class="hljs-comment">&lt;!-- or --&gt;</span>
83+
<span class="hljs-tag">&lt;<span class="hljs-name">script</span> <span class="hljs-attr">src</span>=<span class="hljs-string">"https://unpkg.com/dynamsoft-javascript-barcode@7.3.0-v2/dist/dbr.js"</span> <span class="hljs-attr">data-productKeys</span>=<span class="hljs-string">"PRODUCT-KEYS"</span>&gt;</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span></code></pre>
84+
<p><a href="https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js">Download zip</a></p>
7585
<a href="#quick-usage" id="quick-usage" style="color: inherit; text-decoration: none;">
7686
<h2>Quick Usage</h2>
7787
</a>
78-
<a href="#web" id="web" style="color: inherit; text-decoration: none;">
79-
<h3>Web</h3>
80-
</a>
8188
<pre><code class="language-html"><span class="hljs-meta">&lt;!DOCTYPE html&gt;</span>
8289
<span class="hljs-tag">&lt;<span class="hljs-name">html</span>&gt;</span>
8390
<span class="hljs-tag">&lt;<span class="hljs-name">body</span>&gt;</span>
@@ -93,6 +100,9 @@ <h3>Web</h3>
93100
</span><span class="hljs-tag">&lt;/<span class="hljs-name">script</span>&gt;</span>
94101
<span class="hljs-tag">&lt;/<span class="hljs-name">body</span>&gt;</span>
95102
<span class="hljs-tag">&lt;/<span class="hljs-name">html</span>&gt;</span></code></pre>
103+
<p><a href="./example/web/vue">Vue example</a></p>
104+
<p><a href="./example/web/react">React example</a></p>
105+
<p><a href="./example/web/angular">Angular example</a></p>
96106
<!--
97107
### Node
98108
@@ -115,6 +125,7 @@ <h3>Web</h3>
115125
<h2>Table of Contents</h2>
116126
</a>
117127
<ul>
128+
<li><a href="#install">Install</a></li>
118129
<li><a href="#quick-usage">Quick Usage</a></li>
119130
<li><a href="#features">Features</a></li>
120131
<li><a href="#live-demo">Live Demo</a></li>
@@ -701,10 +712,7 @@ <h2>Self-hosted Deployment</h2>
701712
<ul>
702713
<li><strong>Step one</strong>: Place the files</li>
703714
</ul>
704-
<p>On your server put the following files in the same directory.</p>
705-
<blockquote>
706-
<p><a href="https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=js">Download zip</a> to get these files.</p>
707-
</blockquote>
715+
<p>On your server put the following files in the same directory. You can get them in <code>dist/</code>.</p>
708716
<pre><code> dbr<span class="hljs-selector-class">.js</span> <span class="hljs-comment">// For &lt;script&gt;</span>
709717
dbr<span class="hljs-selector-class">.browser</span><span class="hljs-selector-class">.mjs</span> <span class="hljs-comment">// For &lt;script type="module"&gt;</span>
710718
dbr<span class="hljs-selector-class">.scanner</span><span class="hljs-selector-class">.html</span> <span class="hljs-comment">// Scanner default UI</span>
@@ -795,7 +803,7 @@ <h2>License Agreement</h2>
795803
<a href="#contact-us" id="contact-us" style="color: inherit; text-decoration: none;">
796804
<h2>Contact Us</h2>
797805
</a>
798-
<p>If there are any questions, please feel free to contact <a href="mailto:&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#100;&#x79;&#x6e;&#x61;&#x6d;&#115;&#111;&#102;&#x74;&#46;&#99;&#x6f;&#x6d;">&#115;&#117;&#x70;&#112;&#x6f;&#114;&#x74;&#64;&#100;&#x79;&#x6e;&#x61;&#x6d;&#115;&#111;&#102;&#x74;&#46;&#99;&#x6f;&#x6d;</a>.</p>
806+
<p>If there are any questions, please feel free to contact <a href="mailto:&#x73;&#117;&#x70;&#x70;&#111;&#114;&#x74;&#x40;&#x64;&#x79;&#x6e;&#97;&#x6d;&#115;&#x6f;&#x66;&#116;&#46;&#99;&#111;&#x6d;">&#x73;&#117;&#x70;&#x70;&#111;&#114;&#x74;&#x40;&#x64;&#x79;&#x6e;&#97;&#x6d;&#115;&#x6f;&#x66;&#116;&#46;&#99;&#111;&#x6d;</a>.</p>
799807
</div>
800808
</div>
801809
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">

0 commit comments

Comments
 (0)