Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc2123ca

Browse files
author
Javier Diaz Chamorro
authored
Merge pull request#7 from coderdiaz/feature/build
New build process
2 parents2d9116d +fee8834 commitc2123ca

32 files changed

+6366
-4330
lines changed

‎.babelrc

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

‎.eslintrc.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module.exports={
2+
root:true,
3+
env:{
4+
node:true,
5+
},
6+
extends:[
7+
'plugin:vue/essential',
8+
'@vue/airbnb',
9+
],
10+
rules:{
11+
'no-console':process.env.NODE_ENV==='production' ?'error' :'off',
12+
'no-debugger':process.env.NODE_ENV==='production' ?'error' :'off',
13+
},
14+
parserOptions:{
15+
parser:'babel-eslint',
16+
},
17+
};

‎.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.DS_Store
22
node_modules/
3-
public/dist/
3+
dist/
44
coverage/
55
npm-debug.log
66
yarn-error.log

‎.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,4 @@ cache:
99
install:
1010
-yarn install
1111
script:
12-
-yarnruntest
12+
-yarn test:unit

‎CONTRIBUTING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
##Contribute

‎README.md

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ $ npm i -S vue-tiny-pagination
2929

3030
```html
3131
<divid="#app">
32-
<tiny-pagination
33-
:total="currentTotal"
34-
@tiny:change-page="changePage"></tiny-pagination>
32+
<tiny-pagination
33+
:total="currentTotal"
34+
@tiny:change-page="changePage"></tiny-pagination>
3535
</div>
3636
```
3737

@@ -76,41 +76,10 @@ Example in browser here: https://jsfiddle.net/coderdiaz/g5vLex83/3/
7676

7777
For see the complete documentation go to the[official website](https://coderdiaz.me/vue-tiny-pagination).
7878

79-
###Donate
80-
81-
<ahref="https://www.buymeacoffee.com/coderdiaz"target="_blank"><imgsrc="https://www.buymeacoffee.com/assets/img/custom_images/white_img.png"alt="Buy Me A Coffee"style="height:auto!important;width:auto!important;" ></a>
82-
83-
###Development
84-
85-
```bash
86-
# install dependencies
87-
npm install
88-
89-
# serve with hot reload at localhost:8080
90-
npm run dev
91-
92-
# build docs with minification
93-
npm run compile:docs
94-
95-
# build project
96-
npm run build
97-
98-
# run tests
99-
npm runtest
100-
```
101-
102-
###What's Included
103-
104-
-`npm run dev`: Webpack +`vue-loader` with proper config for source maps & hot-reload.
105-
106-
-`npm run build`: build with HTML/CSS/JS minification.
107-
108-
For detailed explanation on how things work, consult the[docs for vue-loader](http://vuejs.github.io/vue-loader). Also check out the[breaking changes in vue-loader@9.0.0](https://github.com/vuejs/vue-loader/releases/tag/v9.0.0).
109-
11079
###Contributions
11180
All contributions are welcome send your PR and Issues.
11281

11382
###License
11483
This is a open-source software licensed under the[MIT license](https://raw.githubusercontent.com/coderdiaz/vue-tiny-pagination/master/LICENSE)
11584

116-
#####Crafted by Javier Diaz
85+
#####Crafted by Javier Diaz

‎babel.config.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports={
2+
presets:[
3+
'@vue/app',
4+
],
5+
};

‎build/rollup.config.js

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

‎dist/vue-tiny-pagination.esm.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎dist/vue-tiny-pagination.min.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎dist/vue-tiny-pagination.umd.js

Lines changed: 0 additions & 1 deletion
This file was deleted.

‎index.html

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

‎index.js

Lines changed: 11 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
1-
importTinyPaginationfrom'./src/components/TinyPagination.vue'
1+
importTinyPaginationfrom'./packages/TinyPagination/index';
22

3-
exportfunctioninstall(Vue){
4-
if(install.installed)return
5-
install.installed=true
6-
Vue.component('TinyPagination',TinyPagination)
7-
}
8-
9-
constplugin={
10-
install
11-
}
3+
constinstall=(Vue)=>{
4+
Vue.component(TinyPagination.name,TinyPagination);
5+
};
126

13-
letGlobalVue=null
14-
if(typeofwindow!=='undefined'){
15-
GlobalVue=window.Vue
16-
}elseif(typeofglobal!=='undefined'){
17-
GlobalVue=global.Vue
18-
}
19-
if(GlobalVue){
20-
GlobalVue.use(plugin)
7+
if(typeofwindow!=='undefined'&&window.Vue){
8+
install(window.Vue);
219
}
2210

23-
export{TinyPagination}
24-
exportdefaultplugin
11+
exportdefault{
12+
version:'0.2.3',
13+
install,
14+
TinyPagination,
15+
};

‎jest.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
module.exports={
2+
moduleFileExtensions:[
3+
'js',
4+
'jsx',
5+
'json',
6+
'vue',
7+
],
8+
transform:{
9+
'^.+\\.vue$':'vue-jest',
10+
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$':'jest-transform-stub',
11+
'^.+\\.jsx?$':'babel-jest',
12+
},
13+
moduleNameMapper:{
14+
'^@/(.*)$':'<rootDir>/src/$1',
15+
},
16+
snapshotSerializers:[
17+
'jest-serializer-vue',
18+
],
19+
testMatch:[
20+
'**/tests/unit/**/*.spec.(js|jsx|ts|tsx)|**/__tests__/*.(js|jsx|ts|tsx)',
21+
],
22+
testURL:'http://localhost/',
23+
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp