Skip to content

Commit

Permalink
chore: upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
scopewu committed Apr 15, 2023
1 parent 7c927ff commit 88fc7f2
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 208 deletions.
27 changes: 17 additions & 10 deletions example/webpack.html
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
max-width: 100%;
}

.qrcode-wrap.border {
display: inline-block;
border-width: 6px !important;
}

@media screen and (min-width: 768px) {
.container-fluid {
max-width: 798px;
Expand Down Expand Up @@ -300,16 +305,18 @@ <h1>qrcode.vue:</h1>
<label class="col-sm-2 col-form-label">QR_CODE:</label>
<div class="col-sm-10">
<div class="form-control-static">
<qrcode-vue
class="qrcode"
:value="value"
:margin='Number(margin)'
:render-as="renderAs"
:size="Number(size)"
:level="level"
:background="background"
:foreground='foreground'
></qrcode-vue>
<div class="border qrcode-wrap">
<qrcode-vue
class="qrcode"
:value="value"
:margin='Number(margin)'
:render-as="renderAs"
:size="Number(size)"
:level="level"
:background="background"
:foreground='foreground'
></qrcode-vue>
</div>
</div>
</div>
</div>
Expand Down
15 changes: 6 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"scripts": {
"start": "webpack serve --config webpack.config.js --mode=development",
"build": "rimraf dist && rollup -c"
"build": "rollup -c"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -50,21 +50,18 @@
},
"dependencies": {},
"devDependencies": {
"@rollup/plugin-commonjs": "^24.0.1",
"@rollup/plugin-node-resolve": "^15.0.1",
"@rollup/plugin-terser": "^0.4.0",
"@rollup/plugin-terser": "^0.4.1",
"@vue/compiler-sfc": "^3.2.47",
"@vue/server-renderer": "^3.2.47",
"html-webpack-plugin": "^5.5.0",
"rimraf": "^4.4.0",
"rollup": "^3.20.0",
"rollup": "^3.20.2",
"rollup-plugin-typescript2": "^0.34.1",
"ts-loader": "^9.4.2",
"typescript": "^5.0.2",
"typescript": "^5.0.4",
"vue": "^3.2.47",
"vue-loader": "^17.0.1",
"webpack": "^5.76.2",
"webpack": "^5.79.0",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.13.1"
"webpack-dev-server": "^4.13.2"
}
}
11 changes: 0 additions & 11 deletions rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import ts from 'rollup-plugin-typescript2'
import commonjs from '@rollup/plugin-commonjs'
import terser from '@rollup/plugin-terser'
import { nodeResolve } from '@rollup/plugin-node-resolve'

import pkg from './package.json' assert { type: 'json' }

Expand Down Expand Up @@ -42,15 +40,6 @@ function createEntry(options) {
exclude: ['src', 'example'],
}
}),
nodeResolve(),
commonjs({
// non-CommonJS modules will be ignored, but you can also
// specifically include/exclude files
include: 'node_modules/**', // Default: undefined
extensions: ['.js'], // Default: [ '.js' ]
ignoreGlobal: false, // Default: false
sourceMap: sourcemap, // Default: true
}),
],
}

Expand Down
4 changes: 2 additions & 2 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ const QRCodeSvg = defineComponent({
const generate = () => {
const { value, level, margin } = props

const cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules()
const cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules()
numCells.value = cells.length + margin * 2

// Drawing strategy: instead of a rect per module, we're going to create a
Expand Down Expand Up @@ -180,7 +180,7 @@ const QRCodeCanvas = defineComponent({
return;
}

const cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules()
const cells = QR.QrCode.encodeText(value, ErrorCorrectLevelMap[level]).getModules()
const numCells = cells.length + margin * 2

const devicePixelRatio = window.devicePixelRatio || 1
Expand Down
Loading

0 comments on commit 88fc7f2

Please sign in to comment.