Skip to content

Commit

Permalink
Add size limit
Browse files Browse the repository at this point in the history
  • Loading branch information
neves committed Aug 25, 2017
1 parent 2e13b98 commit cd99967
Show file tree
Hide file tree
Showing 4 changed files with 2,007 additions and 65 deletions.
2 changes: 1 addition & 1 deletion dist/v-money.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "Vue currency input/directive mask",
"main": "dist/v-money.js",
"scripts": {
"size": "size-limit",
"upgrade:check": "ncu",
"upgrade:apply": "ncu -a",
"dev": "vue build ./src/docs/docs.vue --config ./src/docs/build.config.js --host 0.0.0.0",
Expand All @@ -24,13 +25,20 @@
"files": [
"dist/"
],
"size-limit": [
{
"path": "dist/v-money.js",
"limit": "1.6 KB"
}
],
"author": "Marcos Neves <[email protected]> (https://vuejs-tips.github.io/)",
"license": "MIT",
"devDependencies": {
"babel-jest": "^20.0.3",
"babel-preset-vue-app": "^1.2.1",
"jest": "^20.0.4",
"npm-check-updates": "^2.12.1",
"size-limit": "^0.10.0",
"vuetify": "^0.14.11"
}
}
2 changes: 1 addition & 1 deletion src/directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default function (el, binding) {
if (el.tagName.toLocaleUpperCase() !== 'INPUT') {
var els = el.getElementsByTagName('input')
if (els.length !== 1) {
throw new Error("v-money requires 1 input, found " + els.length)
// throw new Error("v-money requires 1 input, found " + els.length)
} else {
el = els[0]
}
Expand Down
Loading

0 comments on commit cd99967

Please sign in to comment.