mirror of
https://github.com/encounter/react-add-to-calendar.git
synced 2026-07-10 21:18:44 -07:00
adding more examples and updating the docs
This commit is contained in:
@@ -25,6 +25,7 @@ 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/';
|
||||
@@ -37,6 +38,7 @@ 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