Rename qrcodelib to QRCode for consistency
This commit is contained in:
parent
1ca069e918
commit
2bf555f9ce
3 changed files with 7 additions and 7 deletions
|
@ -102,7 +102,7 @@ QRCode.toCanvas(canvas, 'sample text', function (error) {
|
|||
|
||||
<script src="/build/qrcode.min.js"></script>
|
||||
<script>
|
||||
qrcodelib.toCanvas(document.getElementById('canvas'), 'sample text', function (error) {
|
||||
QRCode.toCanvas(document.getElementById('canvas'), 'sample text', function (error) {
|
||||
if (error) console.error(error)
|
||||
console.log('success!');
|
||||
})
|
||||
|
@ -261,8 +261,8 @@ With precompiled bundle:
|
|||
<script src="/build/qrcode.min.js"></script>
|
||||
<script src="/build/qrcode.tosjis.min.js"></script>
|
||||
<script>
|
||||
qrcodelib.toCanvas(document.getElementById('canvas'),
|
||||
'sample text', { toSJISFunc: qrcodelib.toSJIS }, function (error) {
|
||||
QRCode.toCanvas(document.getElementById('canvas'),
|
||||
'sample text', { toSJISFunc: QRCode.toSJIS }, function (error) {
|
||||
if (error) console.error(error)
|
||||
console.log('success!')
|
||||
})
|
||||
|
|
4
build.js
4
build.js
|
@ -66,8 +66,8 @@ function minify (inputFile, outputFile, onDone) {
|
|||
|
||||
var q = [
|
||||
createFolder.bind(null, './build', done),
|
||||
bundle.bind(null, 'lib/index.js', 'qrcodelib', 'build/qrcode.js', done),
|
||||
bundle.bind(null, 'helper/to-sjis.js', 'qrcodelib.toSJIS', 'build/qrcode.tosjis.js', done),
|
||||
bundle.bind(null, 'lib/index.js', 'QRCode', 'build/qrcode.js', done),
|
||||
bundle.bind(null, 'helper/to-sjis.js', 'QRCode.toSJIS', 'build/qrcode.tosjis.js', done),
|
||||
minify.bind(null, 'build/qrcode.js', 'build/qrcode.min.js', done),
|
||||
minify.bind(null, 'build/qrcode.tosjis.js', 'build/qrcode.tosjis.min.js', done)
|
||||
]
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
errorEl.style.display = 'none'
|
||||
canvasEl.style.display = 'block'
|
||||
|
||||
qrcodelib.toCanvas(canvasEl, text, {
|
||||
QRCode.toCanvas(canvasEl, text, {
|
||||
version: versionEl.value,
|
||||
errorCorrectionLevel: errorLevelEl.options[errorLevelEl.selectedIndex].text,
|
||||
margin: marginEl.value,
|
||||
|
@ -126,7 +126,7 @@
|
|||
light: lightColorEl.value,
|
||||
dark: darkColorEl.value
|
||||
},
|
||||
toSJISFunc: qrcodelib.toSJIS
|
||||
toSJISFunc: QRCode.toSJIS
|
||||
}, function (error, canvas) {
|
||||
if (error) {
|
||||
canvasEl.style.display = 'none'
|
||||
|
|
Loading…
Reference in a new issue