Skip to content

Commit

Permalink
Fix module problem
Browse files Browse the repository at this point in the history
  • Loading branch information
scleriot committed Sep 21, 2017
1 parent fada63c commit a076502
Show file tree
Hide file tree
Showing 11 changed files with 4,220 additions and 38 deletions.
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,20 @@ npm install -S vue-inputmask
## With Typescript
```typescript
import Vue from 'vue'
import VueInputMask from 'vue-inputmask'
const VueInputMask = require('vue-inputmask').default

Vue.use(VueInputMask)
```

## With a script tag

```html
<script src="./node_modules/inputmask/dist/inputmask/dependencyLibs/inputmask.dependencyLib.js"></script>
<script src="./node_modules/inputmask/dist/inputmask/inputmask.js"></script>
<script src="./vue-inputmask.js"></script>
<script src="./dist/vue-inputmask-browser.js"></script>
```

# Usage
``` html
```html
<input type="text" v-mask="'99/99/9999'" />
<input type="text" v-mask="{mask: '99/99/9999', greedy: true}" />
```
```
20 changes: 20 additions & 0 deletions dist/vue-inputmask-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
/*
* vue-inputmask
*
* (C) 2016 Simon Clériot
* MIT LICENCE
*
*/
(function(){
var inputmaskPlugin = {
install: function(Vue, options) {
Vue.directive('mask', {
bind: function(el, binding) {
window.Inputmask(binding.value).mask(el);
}
});
}
};

window.VueInputmask = inputmaskPlugin
})()
128 changes: 128 additions & 0 deletions dist/vue-inputmask.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions dist/vue-inputmask.js.map

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

Loading

0 comments on commit a076502

Please sign in to comment.