This repository was archived by the owner on Apr 1, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Expand file tree Collapse file tree 2 files changed +17
-14
lines changed Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ You can add more examples!
22
33 <{{ name }} text="Hello World!" style="background-color: pink;"></{{ name }}>
44
5- * Remember to update styleguide.config.js also
5+ * Remember that you can also update styleguide.config.js to use your own
6+ own doc definitions
Original file line number Diff line number Diff line change 11const loaders = require ( 'vue-webpack-loaders' ) ;
2+ const glob = require ( 'glob' ) . sync ;
3+ const basename = require ( 'path' ) . basename ;
4+
5+ function getDocSections ( ) {
6+ b = p => basename ( p , '.md' ) ;
7+ return glob ( 'docs/*.md' )
8+ . filter ( path => b ( path ) !== 'Introduction' )
9+ . map ( path => ( {
10+ name : b ( path ) ,
11+ content : path
12+ } ) ) ;
13+ }
14+
215/**
316 * More info about this styleguide configuration in
417 * vue-styleguidist/vue-styleguidist github repository
@@ -7,22 +20,11 @@ module.exports = {
720 sections : [
821 {
922 /* The component itself */
10- name : '{{ name }} ' ,
23+ name : 'test-cmp1 ' ,
1124 content : 'docs/Introduction.md' ,
1225 components : 'src/**/*.vue' ,
1326 // ignore: ['src/ignored-component/ignored-component.vue'],
14- sections : [
15- /* One item for each demo or example of the component */
16- {
17- name : 'Use Case 1' ,
18- content : 'docs/UseCase1.md'
19- } ,
20- /* One item for each demo or example of the component */
21- {
22- name : 'Use Case 2' ,
23- content : 'docs/UseCase2.md'
24- }
25- ]
27+ sections : getDocSections ( )
2628 } ,
2729 ] ,
2830 webpackConfig : {
You can’t perform that action at this time.
0 commit comments