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)
|
### `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' },
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
Reference in New Issue
Block a user