Skip to content

Commit

Permalink
Merge pull request #43 from mebjas/minify
Browse files Browse the repository at this point in the history
add minifying and combining as part of npm run build
  • Loading branch information
mebjas authored May 8, 2020
2 parents e9521b0 + a63465f commit b81d404
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
3 changes: 2 additions & 1 deletion minified/html5-qrcode.min.js

Large diffs are not rendered by default.

7 changes: 5 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"description": "a cross platform HTML5 QR Code scanner",
"main": "html5-qrcode.js",
"scripts": {
"build": "babel html5-qrcode.js -d transpiled",
"prebuild": "echo > minified/html5-qrcode.min.js && echo 'html5-qrcode.min.js truncated!'",
"build": "babel html5-qrcode.js -d transpiled && echo 'code transpiled' && minify transpiled/html5-qrcode.js --out-file minified/tmp.js",
"postbuild": "cp third_party/qrcode.min.js minified/html5-qrcode.min.js && cat minified/tmp.js >> minified/html5-qrcode.min.js && rm minified/tmp.js && echo 'minifed and combined'",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand All @@ -27,7 +29,8 @@
"devDependencies": {
"@babel/cli": "^7.8.4",
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5"
"@babel/preset-env": "^7.9.5",
"babel-minify": "^0.5.1"
},
"dependencies": {
"@babel/plugin-proposal-class-properties": "^7.8.3"
Expand Down
File renamed without changes.
4 changes: 4 additions & 0 deletions third_party/qrcode.min.js

Large diffs are not rendered by default.

0 comments on commit b81d404

Please sign in to comment.