├── .babelrc
├── .gitignore
├── .npmignore
├── LICENSE
├── README.md
├── package-lock.json
├── package.json
├── src
└── JwPagination.vue
└── webpack.config.js
/.babelrc:
--------------------------------------------------------------------------------
1 | {
2 | "presets": [
3 | "@babel/preset-env"
4 | ]
5 | }
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Component lib directory
2 | lib
3 |
4 | # Logs
5 | logs
6 | *.log
7 | npm-debug.log*
8 |
9 | # Runtime data
10 | pids
11 | *.pid
12 | *.seed
13 |
14 | # Directory for instrumented libs generated by jscoverage/JSCover
15 | lib-cov
16 |
17 | # Coverage directory used by tools like istanbul
18 | coverage
19 |
20 | # nyc test coverage
21 | .nyc_output
22 |
23 | # Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24 | .grunt
25 |
26 | # node-waf configuration
27 | .lock-wscript
28 |
29 | # Compiled binary addons (http://nodejs.org/api/addons.html)
30 | build/Release
31 |
32 | # Dependency directories
33 | node_modules
34 | jspm_packages
35 | typings
36 |
37 | # Optional npm cache directory
38 | .npm
39 |
40 | # Optional REPL history
41 | .node_repl_history
42 |
43 | # VS Code settings
44 | .vscode
--------------------------------------------------------------------------------
/.npmignore:
--------------------------------------------------------------------------------
1 | .vscode
2 | src
3 | .babelrc
4 | webpack.config.js
5 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2019 Jason Watmore
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 all
13 | 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 THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # jw-vue-pagination
2 |
3 | Vue Pagination Component
4 |
5 | Usage instructions and demo available at https://jasonwatmore.com/post/2019/08/21/vue-js-simple-pagination-example
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "jw-vue-pagination",
3 | "version": "1.0.3",
4 | "homepage": "https://jasonwatmore.com/post/2019/08/21/vue-js-simple-pagination-example",
5 | "repository": {
6 | "type": "git",
7 | "url": "https://github.com/cornflourblue/jw-vue-pagination"
8 | },
9 | "scripts": {
10 | "build": "webpack"
11 | },
12 | "main": "./lib/JwPagination.js",
13 | "license": "MIT",
14 | "devDependencies": {
15 | "@babel/core": "^7.5.5",
16 | "@babel/preset-env": "^7.5.5",
17 | "babel-loader": "^8.0.6",
18 | "babel-preset-vue": "^2.0.2",
19 | "css-loader": "^3.2.0",
20 | "html-webpack-plugin": "^3.2.0",
21 | "path": "^0.12.7",
22 | "vue": "^2.6.10",
23 | "vue-loader": "^15.7.1",
24 | "vue-template-compiler": "^2.6.10",
25 | "webpack": "^4.39.1",
26 | "webpack-cli": "^3.3.6",
27 | "webpack-dev-server": "^3.8.0"
28 | },
29 | "dependencies": {
30 | "jw-paginate": "^1.0.4"
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/src/JwPagination.vue:
--------------------------------------------------------------------------------
1 |
2 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/webpack.config.js:
--------------------------------------------------------------------------------
1 | var path = require('path');
2 | const VueLoaderPlugin = require('vue-loader/lib/plugin')
3 |
4 | module.exports = {
5 | mode: 'production',
6 | entry: './src/JwPagination.vue',
7 | output: {
8 | path: path.resolve('lib'),
9 | filename: 'JwPagination.js',
10 | libraryTarget: 'commonjs2'
11 | },
12 | module: {
13 | rules: [
14 | {
15 | test: /\.vue?$/,
16 | loader: 'vue-loader'
17 | },
18 | {
19 | test: /\.js?$/,
20 | loader: 'babel-loader'
21 | }
22 | ]
23 | },
24 | plugins: [
25 | new VueLoaderPlugin()
26 | ]
27 | }
--------------------------------------------------------------------------------