Skip to content

Commit 7ae36a3

Browse files
committed
first commit
0 parents  commit 7ae36a3

34 files changed

+2665
-0
lines changed

.eslintrc

+171
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
{
2+
"plugins": [
3+
"eslint-plugin-html" // https://github.com/BenoitZugmeyer/eslint-plugin-html
4+
],
5+
"parser": "babel-eslint",
6+
"env": { // http://eslint.org/docs/user-guide/configuring.html#specifying-environments
7+
"browser": true, // browser global variables
8+
"node": true // Node.js global variables and Node.js-specific rules
9+
},
10+
"ecmaFeatures": {
11+
"arrowFunctions": true,
12+
"blockBindings": true,
13+
"classes": true,
14+
"defaultParams": true,
15+
"destructuring": true,
16+
"forOf": true,
17+
"generators": false,
18+
"modules": true,
19+
"objectLiteralComputedProperties": true,
20+
"objectLiteralDuplicateProperties": false,
21+
"objectLiteralShorthandMethods": true,
22+
"objectLiteralShorthandProperties": true,
23+
"spread": true,
24+
"superInFunctions": true,
25+
"templateStrings": true,
26+
"jsx": false
27+
},
28+
"rules": {
29+
/**
30+
* Strict mode
31+
*/
32+
// babel inserts "use strict"; for us
33+
"strict": [2, "never"], // http://eslint.org/docs/rules/strict
34+
35+
/**
36+
* ES6
37+
*/
38+
"no-var": 1, // http://eslint.org/docs/rules/no-var
39+
"prefer-const": 1, // http://eslint.org/docs/rules/prefer-const
40+
41+
/**
42+
* Variables
43+
*/
44+
"no-shadow": 2, // http://eslint.org/docs/rules/no-shadow
45+
"no-shadow-restricted-names": 2, // http://eslint.org/docs/rules/no-shadow-restricted-names
46+
"no-unused-vars": [2, { // http://eslint.org/docs/rules/no-unused-vars
47+
"vars": "local",
48+
"args": "after-used"
49+
}],
50+
"no-use-before-define": 2, // http://eslint.org/docs/rules/no-use-before-define
51+
52+
/**
53+
* Possible errors
54+
*/
55+
"comma-dangle": 0,
56+
"no-cond-assign": [2, "always"], // http://eslint.org/docs/rules/no-cond-assign
57+
"no-console": 1, // http://eslint.org/docs/rules/no-console
58+
"no-debugger": 1, // http://eslint.org/docs/rules/no-debugger
59+
"no-alert": 1, // http://eslint.org/docs/rules/no-alert
60+
"no-constant-condition": 1, // http://eslint.org/docs/rules/no-constant-condition
61+
"no-dupe-keys": 2, // http://eslint.org/docs/rules/no-dupe-keys
62+
"no-duplicate-case": 2, // http://eslint.org/docs/rules/no-duplicate-case
63+
"no-empty": 2, // http://eslint.org/docs/rules/no-empty
64+
"no-ex-assign": 2, // http://eslint.org/docs/rules/no-ex-assign
65+
"no-extra-boolean-cast": 0, // http://eslint.org/docs/rules/no-extra-boolean-cast
66+
"no-extra-semi": 2, // http://eslint.org/docs/rules/no-extra-semi
67+
"no-func-assign": 2, // http://eslint.org/docs/rules/no-func-assign
68+
"no-inner-declarations": 2, // http://eslint.org/docs/rules/no-inner-declarations
69+
"no-invalid-regexp": 2, // http://eslint.org/docs/rules/no-invalid-regexp
70+
"no-irregular-whitespace": 2, // http://eslint.org/docs/rules/no-irregular-whitespace
71+
"no-obj-calls": 2, // http://eslint.org/docs/rules/no-obj-calls
72+
"no-sparse-arrays": 2, // http://eslint.org/docs/rules/no-sparse-arrays
73+
"no-unreachable": 2, // http://eslint.org/docs/rules/no-unreachable
74+
"use-isnan": 2, // http://eslint.org/docs/rules/use-isnan
75+
"block-scoped-var": 2, // http://eslint.org/docs/rules/block-scoped-var
76+
77+
/**
78+
* Best practices
79+
*/
80+
"consistent-return": 2, // http://eslint.org/docs/rules/consistent-return
81+
"curly": [2, "multi-line"], // http://eslint.org/docs/rules/curly
82+
"default-case": 2, // http://eslint.org/docs/rules/default-case
83+
"dot-notation": [2, { // http://eslint.org/docs/rules/dot-notation
84+
"allowKeywords": true
85+
}],
86+
"eqeqeq": 2, // http://eslint.org/docs/rules/eqeqeq
87+
"guard-for-in": 2, // http://eslint.org/docs/rules/guard-for-in
88+
"no-caller": 2, // http://eslint.org/docs/rules/no-caller
89+
"no-else-return": 2, // http://eslint.org/docs/rules/no-else-return
90+
"no-eq-null": 2, // http://eslint.org/docs/rules/no-eq-null
91+
"no-eval": 2, // http://eslint.org/docs/rules/no-eval
92+
"no-extend-native": 2, // http://eslint.org/docs/rules/no-extend-native
93+
"no-extra-bind": 2, // http://eslint.org/docs/rules/no-extra-bind
94+
"no-fallthrough": 2, // http://eslint.org/docs/rules/no-fallthrough
95+
"no-floating-decimal": 2, // http://eslint.org/docs/rules/no-floating-decimal
96+
"no-implied-eval": 2, // http://eslint.org/docs/rules/no-implied-eval
97+
"no-lone-blocks": 2, // http://eslint.org/docs/rules/no-lone-blocks
98+
"no-loop-func": 2, // http://eslint.org/docs/rules/no-loop-func
99+
"no-multi-str": 2, // http://eslint.org/docs/rules/no-multi-str
100+
"no-native-reassign": 2, // http://eslint.org/docs/rules/no-native-reassign
101+
"no-new": 0,
102+
"no-new-func": 2, // http://eslint.org/docs/rules/no-new-func
103+
"no-new-wrappers": 2, // http://eslint.org/docs/rules/no-new-wrappers
104+
"no-octal": 2, // http://eslint.org/docs/rules/no-octal
105+
"no-octal-escape": 2, // http://eslint.org/docs/rules/no-octal-escape
106+
"no-param-reassign": 2, // http://eslint.org/docs/rules/no-param-reassign
107+
"no-proto": 2, // http://eslint.org/docs/rules/no-proto
108+
"no-redeclare": 2, // http://eslint.org/docs/rules/no-redeclare
109+
"no-return-assign": 2, // http://eslint.org/docs/rules/no-return-assign
110+
"no-script-url": 2, // http://eslint.org/docs/rules/no-script-url
111+
"no-self-compare": 2, // http://eslint.org/docs/rules/no-self-compare
112+
"no-sequences": 2, // http://eslint.org/docs/rules/no-sequences
113+
"no-throw-literal": 2, // http://eslint.org/docs/rules/no-throw-literal
114+
"no-with": 2, // http://eslint.org/docs/rules/no-with
115+
"radix": 2, // http://eslint.org/docs/rules/radix
116+
"vars-on-top": 2, // http://eslint.org/docs/rules/vars-on-top
117+
"wrap-iife": [2, "any"], // http://eslint.org/docs/rules/wrap-iife
118+
"yoda": 2, // http://eslint.org/docs/rules/yoda
119+
120+
/**
121+
* Style
122+
*/
123+
"brace-style": [2, // http://eslint.org/docs/rules/brace-style
124+
"1tbs", {
125+
"allowSingleLine": true
126+
}],
127+
"quotes": [
128+
2, "single", "avoid-escape" // http://eslint.org/docs/rules/quotes
129+
],
130+
"camelcase": [2, { // http://eslint.org/docs/rules/camelcase
131+
"properties": "never"
132+
}],
133+
"comma-spacing": [2, { // http://eslint.org/docs/rules/comma-spacing
134+
"before": false,
135+
"after": true
136+
}],
137+
"comma-style": [2, "last"], // http://eslint.org/docs/rules/comma-style
138+
"eol-last": 2, // http://eslint.org/docs/rules/eol-last
139+
"func-names": 1, // http://eslint.org/docs/rules/func-names
140+
"key-spacing": [2, { // http://eslint.org/docs/rules/key-spacing
141+
"beforeColon": false,
142+
"afterColon": true
143+
}],
144+
"new-cap": [2, { // http://eslint.org/docs/rules/new-cap
145+
"newIsCap": true
146+
}],
147+
"no-multiple-empty-lines": 0,
148+
"no-nested-ternary": 2, // http://eslint.org/docs/rules/no-nested-ternary
149+
"no-new-object": 2, // http://eslint.org/docs/rules/no-new-object
150+
"no-spaced-func": 2, // http://eslint.org/docs/rules/no-spaced-func
151+
"no-trailing-spaces": 2, // http://eslint.org/docs/rules/no-trailing-spaces
152+
"no-extra-parens": [2, "functions"], // http://eslint.org/docs/rules/no-extra-parens
153+
"no-underscore-dangle": 0, // http://eslint.org/docs/rules/no-underscore-dangle
154+
"one-var": [2, "never"], // http://eslint.org/docs/rules/one-var
155+
"padded-blocks": [2, "never"], // http://eslint.org/docs/rules/padded-blocks
156+
"semi": [2, "never"], // http://eslint.org/docs/rules/semi
157+
"semi-spacing": [2, { // http://eslint.org/docs/rules/semi-spacing
158+
"before": false,
159+
"after": true
160+
}],
161+
"space-after-keywords": 2, // http://eslint.org/docs/rules/space-after-keywords
162+
"space-before-blocks": 2, // http://eslint.org/docs/rules/space-before-blocks
163+
"space-before-function-paren": [2, "never"], // http://eslint.org/docs/rules/space-before-function-paren
164+
"space-infix-ops": 2, // http://eslint.org/docs/rules/space-infix-ops
165+
"space-return-throw-case": 2, // http://eslint.org/docs/rules/space-return-throw-case
166+
"spaced-comment": [2, "always", {// http://eslint.org/docs/rules/spaced-comment
167+
"exceptions": ["-", "+"],
168+
"markers": ["=", "!"] // space here to support sprockets directives
169+
}]
170+
}
171+
}

.gitignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
.DS_Store
2+
node_modules
3+
npm-debug.log
4+
static
5+
build
6+
.idea

LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2016 Alex Kyriakidis <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# vue-paginator
2+
3+
> A Vue.js plugin to easily integrate pagination to your projects.
4+
5+
## Install Through npm
6+
``` bash
7+
npm install vuejs-paginator -save
8+
```
9+
10+
## Usage
11+
Register VPaginator component inside your Vue instance.
12+
13+
Use it in your HTML file.
14+
15+
```html
16+
<v-paginator :resource.sync="animals" :resource_url="api/animals"></v-paginator>
17+
```
18+
19+
### THATS IT
20+
21+
Then you will have access to the returned data inside your `resource` variable, in this example **animals**, and you'll be able to render it as you would normally do.
22+
```html
23+
<v-for="animal in animal">
24+
{{ animal.name }}
25+
</v-for>
26+
```
27+
28+
## Build Setup
29+
30+
``` bash
31+
# install dependencies
32+
npm install
33+
34+
# build for production with minification
35+
npm run build
36+
37+
# run unit tests
38+
npm run unit
39+
# run all tests
40+
npm test
41+
```

0 commit comments

Comments
 (0)