Skip to content

Commit 771af3a

Browse files
committed
Reformat md files to be standard compatible
1 parent 63b14a5 commit 771af3a

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

CODE_OF_CONDUCT.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
# Contributor Covenant Code of Conduct
22

33
## Our Pledge
4+
45
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
56

67
## Our Standards
8+
79
Examples of behavior that contributes to creating a positive environment include:
810

911
- Using welcoming and inclusive language
@@ -21,19 +23,23 @@ Examples of unacceptable behavior by participants include:
2123
- Other conduct which could reasonably be considered inappropriate in a professional setting
2224

2325
## Our Responsibilities
26+
2427
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
2528

2629
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
2730

2831
## Scope
32+
2933
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
3034

3135
## Enforcement
36+
3237
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at markus.oberlehner@gmail.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
3338

3439
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
3540

3641
## Attribution
42+
3743
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
3844

3945
[homepage]: http://contributor-covenant.org

CONTRIBUTING.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Contributing
22

33
## Reporting Issues
4+
45
Found a problem? Want a new feature?
56

67
- See if your issue or idea has [already been reported].
@@ -9,6 +10,7 @@ Found a problem? Want a new feature?
910
Remember, a bug is a *demonstrable problem* caused by *our* code.
1011

1112
## Submitting Pull Requests
13+
1214
Pull requests are the greatest contributions, so be sure they are focused in scope, and do avoid unrelated commits.
1315

1416
1. To begin, [fork this project], clone your fork, and add our upstream.

README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# vuex-map-fields
2+
23
[![Patreon](https://img.shields.io/badge/patreon-donate-blue.svg)](https://www.patreon.com/maoberlehner)
34
[![Donate](https://img.shields.io/badge/Donate-PayPal-blue.svg)](https://paypal.me/maoberlehner)
45
[![Build Status](https://travis-ci.org/maoberlehner/vuex-map-fields.svg?branch=master)](https://travis-ci.org/maoberlehner/vuex-map-fields)
@@ -8,14 +9,17 @@
89
Enable two-way data binding for form fields saved in a Vuex store.
910

1011
## Install
12+
1113
```bash
1214
npm install --save vuex-map-fields
1315
```
1416

1517
### Basic example
18+
1619
The following example component shows the most basic usage, for mapping fields to the Vuex store using two-way data binding with `v-model`, without directly modifying the store itself, but using getter and setter functions internally (as it is described in the official Vuex documentation: [Two-way Computed Property](https://vuex.vuejs.org/en/forms.html#two-way-computed-property)).
1720

1821
#### Store
22+
1923
```js
2024
import Vue from 'vue';
2125
import Vuex from 'vuex';
@@ -45,6 +49,7 @@ export default new Vuex.Store({
4549
```
4650

4751
#### Component
52+
4853
```html
4954
<template>
5055
<div id="app">
@@ -72,9 +77,11 @@ export default {
7277
```
7378

7479
### Nested properties
80+
7581
Oftentimes you want to have nested properties in the Vuex store. `vuex-map-fields` supports nested data structures by utilizing the object dot string notation.
7682

7783
#### Store
84+
7885
```js
7986
import Vue from 'vue';
8087
import Vuex from 'vuex';
@@ -105,6 +112,7 @@ export default new Vuex.Store({
105112
```
106113

107114
#### Component
115+
108116
```html
109117
<template>
110118
<div id="app">
@@ -135,6 +143,7 @@ export default {
135143
```
136144

137145
### Rename properties
146+
138147
Sometimes you might want to give your computed properties different names than what you're using in the Vuex store. Renaming properties is made possible by passing an object of fields to the `mapFields` function instead of an array.
139148

140149
```html
@@ -160,9 +169,11 @@ export default {
160169
```
161170

162171
### Custom getters and mutations
172+
163173
By default `vuex-map-fields` is searching for the given properties starting from the root of your state object. Depending on the size of your application, the state object might become quite big and therefore updating the state starting from the root might become a performance issue. To circumvent such problems, it is possible to create a custom `mapFields()` function which is configured to access custom mutation and getter functions which don't start from the root of the state object but are accessing a specific point of the state.
164174

165175
#### Store
176+
166177
```js
167178
import Vue from 'vue';
168179
import Vuex from 'vuex';
@@ -197,6 +208,7 @@ export default new Vuex.Store({
197208
```
198209

199210
#### Component
211+
200212
```html
201213
<template>
202214
<div id="app">
@@ -231,9 +243,11 @@ export default {
231243
```
232244

233245
### Vuex modules
246+
234247
Vuex makes it possible to divide the store into modules.
235248

236249
#### Store
250+
237251
```js
238252
import Vue from 'vue';
239253
import Vuex from 'vuex';
@@ -271,6 +285,7 @@ export default new Vuex.Store({
271285
```
272286

273287
#### Component
288+
274289
```html
275290
<template>
276291
<div id="app">
@@ -297,9 +312,11 @@ export default {
297312
```
298313

299314
### Namespaced Vuex modules
315+
300316
By default, mutations and getters inside modules are registered under the global namespace – but you can mark modules as `namespaced` which prevents naming clashes of mutations and getters between modules.
301317

302318
#### Store
319+
303320
```js
304321
import Vue from 'vue';
305322
import Vuex from 'vuex';
@@ -328,6 +345,7 @@ export default new Vuex.Store({
328345
```
329346

330347
#### Component
348+
331349
```html
332350
<template>
333351
<div id="app">
@@ -353,9 +371,11 @@ export default {
353371
```
354372

355373
### Multi-row fields
374+
356375
If you want to build a form which allows the user to enter multiple rows of a specific data type with multiple fields (e.g. multiple addresses) you can use the multi-row field mapping function.
357376

358377
#### Store
378+
359379
```js
360380
import Vue from 'vue';
361381
import Vuex from 'vuex';
@@ -388,6 +408,7 @@ export default new Vuex.Store({
388408
```
389409

390410
#### Component
411+
391412
```html
392413
<template>
393414
<div id="app">
@@ -410,6 +431,7 @@ export default {
410431
```
411432

412433
## Upgrade from 0.x.x to 1.x.x
434+
413435
Instead of accessing the state directly, since the 1.0.0 release, in order to enable the ability to implement custom getters and mutations, `vuex-map-fields` is using a getter function to access the state. This makes it necessary to add a getter function to your Vuex store.
414436

415437
```js
@@ -438,12 +460,15 @@ export default new Vuex.Store({
438460
```
439461

440462
## About
463+
441464
### Author
465+
442466
Markus Oberlehner
443467
Website: https://markus.oberlehner.net
444468
Twitter: https://twitter.com/MaOberlehner
445469
PayPal.me: https://paypal.me/maoberlehner
446470
Patreon: https://www.patreon.com/maoberlehner
447471

448472
### License
473+
449474
MIT

0 commit comments

Comments
 (0)