Skip to content

Commit 38c3858

Browse files
committed
chore(docs): update readme and change docs to use readme as intro section
1 parent bce6a84 commit 38c3858

File tree

4 files changed

+54
-57
lines changed

4 files changed

+54
-57
lines changed

README.md

Lines changed: 46 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,80 @@
1+
<div align="center" markdown="1" style="text-align:center">
2+
13
# Vue Input Facade
24

3-
A lightweight and dependency free input facade created specific for Vue
5+
A lightweight and dependency free input masking library created specific for Vue
6+
7+
[![Build Status](https://travis-ci.org/RonaldJerez/vue-input-facade.svg?branch=master)](https://travis-ci.org/RonaldJerez/vue-input-facade)
8+
[![Coverage Status](https://coveralls.io/repos/github/RonaldJerez/vue-input-facade/badge.svg?branch=master)](https://coveralls.io/github/RonaldJerez/vue-input-facade?branch=master)
9+
[![License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
10+
[![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
11+
12+
<div class="hide" markdown="1">
413

514
## [Docs and Demo](https://ronaldjerez.github.io/vue-input-facade)
615

16+
</div>
17+
18+
---
19+
20+
</div>
21+
722
## Installing
823

9-
```
24+
```bash
1025
npm i vue-input-facade
11-
or
26+
```
27+
28+
```bash
1229
yarn add vue-input-facade
1330
```
1431

1532
## Importing
1633

1734
### Globally
1835

19-
installs the component, directive and filter for your entire application.
36+
Installs the component, directive and filter for your entire application.
2037

21-
```js
38+
```javascript
2239
import InputFacade from 'vue-input-facade'
2340
Vue.use(InputFacade)
2441
```
2542

2643
### Locally
2744

28-
```js
45+
Install per component as needed
46+
47+
```javascript
2948
import { InputFacade, facade, filter } from 'vue-input-facade'
49+
3050
export default {
3151
components: { InputFacade },
3252
directives: { facade },
33-
filters: { facade: filter }
53+
filters: { facade: filter },
54+
// ... rest of component config
3455
}
3556
```
3657

58+
### Default Mask Tokens
59+
60+
+ `S` = alpha characters
61+
+ `#` = numerical characters
62+
+ `X` = alpha numerical characters
63+
+ `A` = alpha characters, transformed to uppercase
64+
+ `a` = alpha characters, transformed to lowercase
65+
+ `\` = escape any of the above characters
66+
67+
See the [token source file](https://github.com/RonaldJerez/vue-input-facade/blob/master/src/tokens.js) for definition signature
68+
69+
<div class="hide" markdown="1">
70+
3771
## Usage
3872

3973
### Component
4074

4175
```html
4276
<label>Phone Number</label>
43-
<input-facade mask="(###) ###-####" name="phoneNumber" type="tel" masked />
77+
<input-facade mask="(###) ###-####" name="phoneNumber" type="tel" />
4478
```
4579

4680
### Directive
@@ -50,16 +84,18 @@ export default {
5084
<input type="text" v-facade="'##/##/##'" />
5185
```
5286

53-
See [demo page](https://ronaldjerez.github.io/vue-input-facade) for more usage example
87+
See [demo page](https://ronaldjerez.github.io/vue-input-facade) for more usage examples
5488

5589
## Thanks
5690

5791
Thanks to [Marcos Neves](https://vuejs-tips.github.io/) for the vue-the-mask component of which this vue-input-facade was originally forked from.
5892

5993
## Contribution
6094

61-
You're free to contribute to this project by submitting Issues and/or pull requests. This project is test-driven, so keep in mind that every change and new feature should be covered by tests. Your name will be added to the hall of fame ;)
95+
You're free to contribute to this project by submitting Issues and/or pull requests. This project is test-driven, so keep in mind that every change and new feature should be covered by tests.
6296

6397
## License
6498

6599
This project is licensed under [MIT License](http://en.wikipedia.org/wiki/MIT_License)
100+
101+
</div>

docs/installing.md

Lines changed: 0 additions & 43 deletions
This file was deleted.

styleguide/config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ module.exports = {
2323
},
2424
sections: [
2525
{
26-
name: 'Installing',
27-
content: `${root}/docs/installing.md`
26+
name: 'Introduction',
27+
content: `${root}/README.md`
2828
},
2929
{
3030
name: 'Component',

styleguide/style.css

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,14 @@ html, body {
55
font-size: 16px;
66
}
77

8-
.rsg--controls-62, .rsg--toolbar-11 {
8+
#introduction, .hide {
9+
display: none;
10+
}
11+
12+
[class^=rsg--controls], [class^=rsg--toolbar] {
913
display: none !important;
1014
}
1115

12-
.rsg--preview-61 {
16+
[class^=rsg--preview] {
1317
margin-bottom: 16px !important;
1418
}

0 commit comments

Comments
 (0)