File tree 3 files changed +280
-12
lines changed
3 files changed +280
-12
lines changed Original file line number Diff line number Diff line change 9
9
"license" : " MIT" ,
10
10
"private" : false ,
11
11
"scripts" : {
12
- "build" : " vue-cli-service build --target lib --name VueTinyPagination index .js" ,
12
+ "build" : " rollup --config rollup.config .js" ,
13
13
"lint" : " vue-cli-service lint" ,
14
14
"test:unit" : " vue-cli-service test:unit" ,
15
15
"prepare" : " yarn test:unit && yarn build"
16
16
},
17
+ "main" : " dist/vue-tiny-pagination.umd.js" ,
18
+ "module" : " dist/vue-tiny-pagination.esm.js" ,
19
+ "unpkg" : " dist/vue-tiny-pagination.min.js" ,
17
20
"repository" : {
18
21
"type" : " git" ,
19
22
"url" : " git+https://github.com/coderdiaz/vue-tiny-pagination.git"
45
48
"babel-core" : " 7.0.0-bridge.0" ,
46
49
"babel-jest" : " ^23.0.1" ,
47
50
"node-sass" : " ^4.9.0" ,
51
+ "rollup" : " ^1.8.0" ,
52
+ "rollup-plugin-commonjs" : " ^9.2.3" ,
53
+ "rollup-plugin-vue" : " ^4.7.2" ,
48
54
"sass-loader" : " ^7.0.1" ,
49
55
"vue-template-compiler" : " ^2.5.17"
50
56
}
Original file line number Diff line number Diff line change
1
+ import vue from 'rollup-plugin-vue' ;
2
+ import commonjs from 'rollup-plugin-commonjs' ;
3
+
4
+ export default [
5
+ // ESM build to be used with webpack/rollup.
6
+ {
7
+ input : 'index.js' ,
8
+ output : {
9
+ format : 'esm' ,
10
+ file : 'dist/vue-tiny-pagination.esm.js' ,
11
+ } ,
12
+ plugins : [
13
+ vue ( ) ,
14
+ commonjs ( ) ,
15
+ ] ,
16
+ } ,
17
+ // UMD build.
18
+ {
19
+ input : 'index.js' ,
20
+ output : {
21
+ name : 'VueTinyPagination' ,
22
+ format : 'umd' ,
23
+ file : 'dist/vue-tiny-pagination.umd.js' ,
24
+ } ,
25
+ plugins : [
26
+ vue ( ) ,
27
+ commonjs ( ) ,
28
+ ] ,
29
+ } ,
30
+ // SSR build.
31
+ {
32
+ input : 'index.js' ,
33
+ output : {
34
+ format : 'cjs' ,
35
+ file : 'dist/vue-tiny-pagination.ssr.js' ,
36
+ } ,
37
+ plugins : [
38
+ vue ( { template : { optimizeSSR : true } } ) ,
39
+ commonjs ( ) ,
40
+ ] ,
41
+ } ,
42
+ // Browser build.
43
+ {
44
+ input : 'index.js' ,
45
+ output : {
46
+ name : 'VueTinyPagination' ,
47
+ format : 'iife' ,
48
+ file : 'dist/vue-tiny-pagination.min.js' ,
49
+ } ,
50
+ plugins : [
51
+ vue ( ) ,
52
+ commonjs ( ) ,
53
+ ] ,
54
+ } ,
55
+ ] ;
You can’t perform that action at this time.
0 commit comments