Quellcode durchsuchen

More work on docs (#2399)

Guy Carmeli vor 7 Jahren
Ursprung
Commit
4cc8d19dd1
Es ist kein Benutzerkonto mit dieser Commiter-Email verbunden

+ 3
- 3
docs/_sidebar.md Datei anzeigen

@@ -7,10 +7,10 @@
7 7
 - Params
8 8
  - [Root](/docs/Root)
9 9
  - [Container](/docs/Container)
10
- - [TopBar](/docs/TopBar)
10
+ - [SideMenu](/docs/SideMenu)
11 11
  - [BottomTabs](/docs/BottomTabs)
12 12
 - Options
13 13
  - [NavigationOptions](/docs/options/NavigationOptions)
14
- - [BottomTabs](/docs/options/BottomTabs)
15
- - [Button](/docs/options/Button)
16 14
  - [TopBar](/docs/options/TopBar)
15
+ - [Button](/docs/options/Button)
16
+ - [BottomTabs](/docs/options/BottomTabs)

+ 1
- 2
docs/docs/BottomTabs.md Datei anzeigen

@@ -1,6 +1,5 @@
1
-<a name="BottomTabs"></a>
1
+<h1>BottomTabs</h1>
2 2
 
3
-## BottomTabs
4 3
 **Properties**
5 4
 
6 5
 | Name | Type |

+ 0
- 19
docs/docs/Button.md Datei anzeigen

@@ -1,19 +0,0 @@
1
-<a name="Button"></a>
2
-
3
-## Button
4
-**Properties**
5
-
6
-| Name | Type |
7
-| --- | --- |
8
-| id | <code>String</code> | 
9
-| testID | <code>string</code> | 
10
-| title | <code>string</code> | 
11
-| buttonColor | <code>string</code> | 
12
-| showAsAction | <code>string</code> | 
13
-| buttonFontWeight | <code>int</code> | 
14
-| disableIconTint | <code>boolean</code> | 
15
-| disabled | <code>boolean</code> | 
16
-
17
-
18
-* * *
19
-

+ 1
- 2
docs/docs/Container.md Datei anzeigen

@@ -1,6 +1,5 @@
1
-<a name="Container"></a>
1
+<h1>Container</h1>
2 2
 
3
-## Container
4 3
 **Properties**
5 4
 
6 5
 | Name | Type | Description |

+ 1
- 2
docs/docs/Root.md Datei anzeigen

@@ -1,6 +1,5 @@
1
-<a name="Root"></a>
1
+<h1>Root</h1>
2 2
 
3
-## Root
4 3
 **Properties**
5 4
 
6 5
 | Name | Type |

+ 1
- 2
docs/docs/SideMenu.md Datei anzeigen

@@ -1,6 +1,5 @@
1
-<a name="SideMenu"></a>
1
+<h1>SideMenu</h1>
2 2
 
3
-## SideMenu
4 3
 **Properties**
5 4
 
6 5
 | Name | Type |

+ 0
- 20
docs/docs/TopBar.md Datei anzeigen

@@ -1,20 +0,0 @@
1
-<a name="TopBar"></a>
2
-
3
-## TopBar
4
-**Properties**
5
-
6
-| Name | Type |
7
-| --- | --- |
8
-| title | <code>string</code> | 
9
-| backgroundColor | <code>color</code> | 
10
-| textColor | <code>color</code> | 
11
-| textFontSize | <code>number</code> | 
12
-| textFontFamily | <code>string</code> | 
13
-| hidden | <code>boolean</code> | 
14
-| animateHide | <code>boolean</code> | 
15
-| hideOnScroll | <code>boolean</code> | 
16
-| transparent | <code>boolean</code> | 
17
-
18
-
19
-* * *
20
-

+ 2
- 2
lib/src/Navigation.js Datei anzeigen

@@ -9,8 +9,8 @@ const LayoutTreeCrawler = require('./commands/LayoutTreeCrawler');
9 9
 const PrivateEventsListener = require('./events/PrivateEventsListener');
10 10
 const PublicEventsRegistry = require('./events/PublicEventsRegistry');
11 11
 const Element = require('./adapters/Element');
12
-const Root = require('./params/Root');
13
-const NavigationOptions = require('./params/NavigationOptions');
12
+const Root = require('./params/containers/Root');
13
+const NavigationOptions = require('./params/options/NavigationOptions');
14 14
 
15 15
 /** @constructor */
16 16
 class Navigation {

lib/src/params/BottomTabs.js → lib/src/params/containers/BottomTabs.js Datei anzeigen


lib/src/params/BottomTabs.test.js → lib/src/params/containers/BottomTabs.test.js Datei anzeigen


lib/src/params/Container.js → lib/src/params/containers/Container.js Datei anzeigen


lib/src/params/Container.test.js → lib/src/params/containers/Container.test.js Datei anzeigen


lib/src/params/Root.js → lib/src/params/containers/Root.js Datei anzeigen


lib/src/params/Root.test.js → lib/src/params/containers/Root.test.js Datei anzeigen


lib/src/params/SideMenu.js → lib/src/params/containers/SideMenu.js Datei anzeigen


lib/src/params/SideMenu.test.js → lib/src/params/containers/SideMenu.test.js Datei anzeigen


+ 17
- 7
scripts/generate-js-doc.js Datei anzeigen

@@ -2,10 +2,11 @@ const jsdoc2md = require('jsdoc-to-markdown');
2 2
 const fs = require('fs');
3 3
 const path = require('path');
4 4
 
5
-const PARAMS_DIR = './lib/src/params/';
6
-const OPTIONS_DIR = './lib/src/params/options/';
5
+const BASE_DIR = './lib/src/params/';
6
+const OPTIONS_DIR = BASE_DIR + 'options/';
7
+const CONTAINERS_DIR = BASE_DIR + 'containers/';
7 8
 const OUTPUT_DIR = './docs/docs/';
8
-const OPTION_PARTIALS = ['./docs/templates/header.hbs', './docs/templates/sig-name.hbs'];
9
+const PARAMS_PARTIALS = ['./docs/templates/header.hbs', './docs/templates/sig-name.hbs'];
9 10
 const PARTIALS = ['./docs/templates/scope.hbs', './docs/templates/docs.hbs'];
10 11
 
11 12
 const generateMarkdownForFile = ({ file, outputDir, partial, separator }) => {
@@ -44,15 +45,24 @@ function inputFiles() {
44 45
       return {
45 46
         file: OPTIONS_DIR + file,
46 47
         outputDir: OUTPUT_DIR + 'options/',
47
-        partial: OPTION_PARTIALS,
48
+        partial: PARAMS_PARTIALS,
48 49
         separator: false
49 50
       };
50 51
     }),
51
-    ...fs.readdirSync(PARAMS_DIR)
52
-        .filter((file) => fs.statSync(PARAMS_DIR + file).isFile())
52
+    ...fs.readdirSync(CONTAINERS_DIR)
53 53
         .map((file) => {
54 54
           return {
55
-            file: PARAMS_DIR + file,
55
+            file: CONTAINERS_DIR + file,
56
+            outputDir: OUTPUT_DIR,
57
+            partial: PARAMS_PARTIALS,
58
+            separator: false
59
+          };
60
+        }),
61
+    ...fs.readdirSync(BASE_DIR)
62
+        .filter((file) => fs.statSync(BASE_DIR + file).isFile())
63
+        .map((file) => {
64
+          return {
65
+            file: BASE_DIR + file,
56 66
             outputDir: OUTPUT_DIR
57 67
           };
58 68
         })