Skip to content

Commit

Permalink
Bundle using Rollup + Babel + Terser
Browse files Browse the repository at this point in the history
  • Loading branch information
LinusU committed Apr 18, 2020
1 parent cb7865b commit 9e702a1
Show file tree
Hide file tree
Showing 6 changed files with 1,332 additions and 70 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ QRCode.toCanvas(canvas, 'sample text', function (error) {
```html
<canvas id="canvas"></canvas>

<script src="/build/qrcode.min.js"></script>
<script src="/build/qrcode.js"></script>
<script>
QRCode.toCanvas(document.getElementById('canvas'), 'sample text', function (error) {
if (error) console.error(error)
Expand All @@ -113,7 +113,9 @@ QRCode.toCanvas(canvas, 'sample text', function (error) {
</script>
```

If you install through `npm`, precompiled files will be available in `node_modules/qrcode/build/` folder.<br>
If you install through `npm`, precompiled files will be available in `node_modules/qrcode/build/` folder.

The precompiled bundle have support for [Internet Explorer 10+, Safari 5.1+, and all evergreen browsers](https://browserl.ist/?q=defaults%2C+IE+%3E%3D+10%2C+Safari+%3E%3D+5.1).

### NodeJS
Require the module `qrcode`
Expand Down Expand Up @@ -347,7 +349,7 @@ QRCode.toFile(
)
```

TypeScript users: if you are using [@types/qrcode](https://www.npmjs.com/package/@types/qrcode), you will need to add a `// @ts-ignore` above the data segment because it expects `data: string`.
TypeScript users: if you are using [@types/qrcode](https://www.npmjs.com/package/@types/qrcode), you will need to add a `// @ts-ignore` above the data segment because it expects `data: string`.

## Multibyte characters
Support for multibyte characters isn't present in the initial QR Code standard, but is possible to encode UTF-8 characters in Byte mode.
Expand Down
52 changes: 0 additions & 52 deletions build.js

This file was deleted.

2 changes: 2 additions & 0 deletions helper/to-sjis-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/* global QRCode */
QRCode.toSJIS = require('./to-sjis')
Loading

0 comments on commit 9e702a1

Please sign in to comment.