-
Notifications
You must be signed in to change notification settings - Fork 0
Generate API docs from ts/tsx files #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate API docs from ts/tsx files #3
Conversation
package.json
Outdated
@@ -26,6 +26,7 @@ | |||
"build:css": "node-sass src/_BaseTable.scss ./styles.css --output-style expanded", | |||
"build": "npm run build:js && npm run build:es && npm run build:css", | |||
"build:typescript": "tsc", | |||
"postinstall": "tsc", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should refer to the build and we should remove build:js
@@ -0,0 +1,291 @@ | |||
# Change Log |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can remove this file
@@ -0,0 +1,22 @@ | |||
The MIT License (MIT) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one
@@ -0,0 +1,91 @@ | |||
### [IMPORTANT] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove information that doesnt apply to this script (e.g. the installation)
"use strict"; | ||
|
||
exports.onCreateNode = require(`./on-node-create`).default; | ||
exports.setFieldsOnGraphQLNodeType = require(`./extend-node-type`).default; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if you can reuse the files that you copied without modifications
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still don't get it. reusing from where?
You told me to use require,
The files copied without modification are needed in the getsby-node.js
of the plugin. For example, parse.js
. They are nowhere else (e.g. not in node_modules, etc). From where do I use require?
@@ -0,0 +1 @@ | |||
// noop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove this file
@@ -0,0 +1,51 @@ | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would skim this package to the minimum since you are not publishing or anything, I would only leave the name to avoid confusions
website/siteConfig.js
Outdated
@@ -28,19 +28,51 @@ module.exports = { | |||
api: [ | |||
{ | |||
title: 'BaseTable', | |||
path: '/api/basetable', | |||
path: `/api/${`basetable`.toLowerCase()}`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change? HTML is even agnostic to capitalization
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. But if I change basetable
to BaseTable
, it shows a blank page. May be because of the following:
./website/src/template/api.js
, line 24.
const link = links.find(link => link.to === `/api/${name.toLowerCase()}`)
Where links
have the form:
[
{
"key": "BaseTable",
"title": "BaseTable",
"to": "/api/BaseTable"
},
{
"key": "Column",
"title": "Column",
"to": "/api/column"
},
// ...
]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway, If we don't need to expose any other than the previous four, we don't need it.
website/siteConfig.js
Outdated
path: `/api/${`TableRow`.toLowerCase()}`, | ||
}, | ||
{ | ||
title: 'TableHeader', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should not expose more than what was exposed before
7e4699c
to
9c44422
Compare
…gin.
Don't remember when i wrote this
...gin.
thing.