1- const path = require ( " path" ) ;
2- const { name, version, url } = require ( " ./package.json" ) ;
1+ const path = require ( ' path' ) ;
2+ const { name, version, url } = require ( ' ./package.json' ) ;
33
44let sections = [
55 {
6- name : " README" ,
7- content : " README.md" ,
6+ name : ' README' ,
7+ content : ' README.md' ,
88 } ,
99 {
10- name : " BookList collection" ,
10+ name : ' BookList collection' ,
1111
12- sections : [
13- {
14- name : "Book" ,
15- content : "src/components/Book/Book.md" ,
16- } ,
17- {
18- name : "BookList" ,
19- content : "src/components/BookList/BookList.md" ,
20- } ,
21- {
22- name : "BibleBookList" ,
23- content : "src/components/BibleBookList/BibleBookList.md" ,
24- } ,
12+ components : [
13+ 'src/components/Book/Book.js' ,
14+ 'src/components/BookList/BookList.js' ,
15+ 'src/components/BibleBookList/BibleBookList.js' ,
2516 ] ,
2617 } ,
2718 {
28- name : " ChapterList collection" ,
19+ name : ' ChapterList collection' ,
2920
30- sections : [
31- {
32- name : "Chapter" ,
33- content : "src/components/Chapter/Chapter.md" ,
34- } ,
35- {
36- name : "ChapterList" ,
37- content : "src/components/ChapterList/ChapterList.md" ,
38- } ,
39- {
40- name : "BibleChapterList" ,
41- content : "src/components/BibleChapterList/BibleChapterList.md" ,
42- } ,
21+ components : [
22+ 'src/components/Chapter/Chapter.js' ,
23+ 'src/components/ChapterList/ChapterList.js' ,
24+ 'src/components/BibleChapterList/BibleChapterList.js' ,
4325 ] ,
4426 } ,
4527] ;
4628
4729module . exports = {
48- components : " src/components/**/[A-Z]*.js" ,
30+ components : ' src/components/**/[A-Z]*.js' ,
4931 ribbon : {
5032 url,
51- text : " Open on GitHub" ,
33+ text : ' Open on GitHub' ,
5234 } ,
5335 title : `${ name } v${ version } ` ,
54- moduleAliases : { "demo-bsa-reference-rcl" : path . resolve ( __dirname , "src" ) } ,
36+ template : {
37+ head : {
38+ meta : [
39+ {
40+ name : 'description' ,
41+ content : 'React component library for bible reference' ,
42+ } ,
43+ ] ,
44+ links : [
45+ {
46+ rel : 'stylesheet' ,
47+ href : 'https://fonts.googleapis.com/css?family=Fira+Sans:400,600' ,
48+ } ,
49+ ] ,
50+ } ,
51+ } ,
52+ moduleAliases : { [ name ] : path . resolve ( __dirname , 'src' ) } ,
5553 skipComponentsWithoutExample : true ,
56- // sections,
57- exampleMode : "expand" ,
58- usageMode : "expand" ,
54+ sections,
55+ styles : {
56+ ComponentsList : {
57+ isSelected : {
58+ fontWeight : 'normal' ,
59+ '&>a' : {
60+ fontWeight : 'bold !important' ,
61+ } ,
62+ } ,
63+ } ,
64+ } ,
65+ theme : {
66+ color : {
67+ link : '#4B4E6A' ,
68+ linkHover : '#2B3847' ,
69+ baseBackground : '#fff' ,
70+ border : '#D0DAE4' ,
71+ sidebarBackground : '#fff' ,
72+ } ,
73+ fontFamily : {
74+ base : '"Fira Sans", sans-serif' ,
75+ } ,
76+ } ,
77+ exampleMode : 'expand' ,
78+ usageMode : 'expand' ,
5979 pagePerSection : true ,
6080 getComponentPathLine ( componentPath ) {
61- const componentName = path . basename ( componentPath , " .js" ) ;
81+ const componentName = path . basename ( componentPath , ' .js' ) ;
6282 return `import { ${ componentName } } from '${ name } ';` ;
6383 } ,
6484 webpackConfig : {
@@ -67,7 +87,7 @@ module.exports = {
6787 {
6888 test : / \. j s $ / ,
6989 exclude : / n o d e _ m o d u l e s / ,
70- loader : " babel-loader" ,
90+ loader : ' babel-loader' ,
7191 } ,
7292 ] ,
7393 } ,
0 commit comments