tweaking docs script and updating docs scripts

This commit is contained in:
Jason Salzman
2016-10-06 16:23:13 -07:00
parent 5d9a12f58f
commit 75432e9049
2 changed files with 3 additions and 5 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
`0` (component) `react-add-to-calendar` (component)
=============== ===============
@@ -50,7 +50,7 @@ defaultValue: `'react-add-to-calendar__dropdown'`
### `event` (required) ### `event` (required)
type: `object` type: `shape[object Object]`
defaultValue: `{ defaultValue: `{
title: 'Sample Event', title: 'Sample Event',
description: 'This is the sample event provided as an example only', description: 'This is the sample event provided as an example only',
@@ -62,7 +62,7 @@ defaultValue: `{
### `listItems` ### `listItems`
type: `array` type: `arrayOf[object Object]`
defaultValue: `[ defaultValue: `[
{ apple: 'Apple Calendar' }, { apple: 'Apple Calendar' },
{ google: 'Google' }, { google: 'Google' },
-2
View File
@@ -25,7 +25,6 @@ process.stdin.on('end', function() {
function buildDocs(api) { function buildDocs(api) {
// api is an object keyed by filepath. We use the file name as component name. // api is an object keyed by filepath. We use the file name as component name.
for (var filepath in api) { for (var filepath in api) {
process.stdout.write(filepath + '\n\n');
var name = getComponentName(filepath); var name = getComponentName(filepath);
var markdown = generateMarkdown(name, api[filepath]); var markdown = generateMarkdown(name, api[filepath]);
var outputLocation = './docs/'; var outputLocation = './docs/';
@@ -38,7 +37,6 @@ function getComponentName(filepath) {
var name = path.basename(filepath); var name = path.basename(filepath);
var ext; var ext;
while ((ext = path.extname(name))) { while ((ext = path.extname(name))) {
process.stdout.write(name + '\n\n');
name = name.substring(0, name.length - ext.length); name = name.substring(0, name.length - ext.length);
} }
return name; return name;