This repository was archived by the owner on Apr 1, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +26
-28
lines changed Expand file tree Collapse file tree 6 files changed +26
-28
lines changed Original file line number Diff line number Diff line change 44
55# Usage
66
7+ ``` js
8+ import Component from ' {{name}}'
9+
10+ Vue .component (' {{name}}' , Component);
11+ ```
12+
713 <{{name}} text="Hello World!"></{{name}}>
814
15+ PS: You can also build to UMD with ` npm run build:umd ` , the component will be
16+ available in the window[ '{{name}}'] variable.
17+
918## Installation
1019
1120### Using yarn
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 33 "version" : " 0.0.1" ,
44 "description" : " {{ description }}" ,
55 "author" : " {{ author }}" ,
6- "main" : " dist/index .js" ,
6+ "main" : " dist/{{name}}.min .js" ,
77 "license" : " MIT" ,
88 "scripts" : {
99 "lint" : " eslint src" ,
10- "build" : " vue build ./src/index.js --config ./build.config.js --dist ./dist/ --prod --lib" ,
10+ "build" : " poi build --format cjs" ,
11+ "build:umd" : " poi build --format umd" ,
1112 "build:doc" : " vue-styleguidist build" ,
1213 "serve" : " vue-styleguidist server"
1314 },
2526 "babel-preset-es2015" : " ^6.24.1" ,
2627 "eslint" : " ^3.17.1" ,
2728 "eslint-plugin-vue" : " beta" ,
28- "vue-cli" : " ^2.8.2" ,
29+ "node-glob" : " ^1.2.0" ,
30+ "poi" : " ^9.3.10" ,
2931 "vue-styleguidist" : " ^1.2.5" ,
3032 "vue-webpack-loaders" : " ^1.0.6" ,
3133 "webpack" : " ^3.1.0"
Original file line number Diff line number Diff line change 1+ const glob = require ( 'glob' ) . sync ;
2+ const { name} = require ( './package.json' ) ;
3+
4+ module . exports = {
5+ entry : glob ( './src/**/*.vue' ) ,
6+ filename : {
7+ js : name + '.min.js' ,
8+ } ,
9+ sourceMap : false ,
10+ html : false
11+ } ;
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ module.exports = {
99 /* The component itself */
1010 name : '{{ name }}' ,
1111 content : 'docs/Introduction.md' ,
12- components : 'src/**/{{ name }} .vue' ,
12+ components : 'src/**/* .vue' ,
1313 // ignore: ['src/ignored-component/ignored-component.vue'],
1414 sections : [
1515 /* One item for each demo or example of the component */
You can’t perform that action at this time.
0 commit comments