mirror of
https://github.com/encounter/react-add-to-calendar.git
synced 2026-07-10 21:18:44 -07:00
tweaking docs script and updating docs scripts
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
`0` (component)
|
||||
`react-add-to-calendar` (component)
|
||||
===============
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ defaultValue: `'react-add-to-calendar__dropdown'`
|
||||
|
||||
### `event` (required)
|
||||
|
||||
type: `object`
|
||||
type: `shape[object Object]`
|
||||
defaultValue: `{
|
||||
title: 'Sample Event',
|
||||
description: 'This is the sample event provided as an example only',
|
||||
@@ -62,7 +62,7 @@ defaultValue: `{
|
||||
|
||||
### `listItems`
|
||||
|
||||
type: `array`
|
||||
type: `arrayOf[object Object]`
|
||||
defaultValue: `[
|
||||
{ apple: 'Apple Calendar' },
|
||||
{ google: 'Google' },
|
||||
|
||||
@@ -25,7 +25,6 @@ process.stdin.on('end', function() {
|
||||
function buildDocs(api) {
|
||||
// api is an object keyed by filepath. We use the file name as component name.
|
||||
for (var filepath in api) {
|
||||
process.stdout.write(filepath + '\n\n');
|
||||
var name = getComponentName(filepath);
|
||||
var markdown = generateMarkdown(name, api[filepath]);
|
||||
var outputLocation = './docs/';
|
||||
@@ -38,7 +37,6 @@ function getComponentName(filepath) {
|
||||
var name = path.basename(filepath);
|
||||
var ext;
|
||||
while ((ext = path.extname(name))) {
|
||||
process.stdout.write(name + '\n\n');
|
||||
name = name.substring(0, name.length - ext.length);
|
||||
}
|
||||
return name;
|
||||
|
||||
Reference in New Issue
Block a user