Skip to content

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

Merged
merged 7 commits into from
Oct 17, 2019

Conversation

galibhassan
Copy link
Collaborator

@galibhassan galibhassan commented Oct 15, 2019

…gin.

Don't remember when i wrote this ...gin. thing.

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",
Copy link
Owner

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
Copy link
Owner

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)
Copy link
Owner

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]
Copy link
Owner

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;
Copy link
Owner

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

Copy link
Collaborator Author

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
Copy link
Owner

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 @@
{
Copy link
Owner

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

@@ -28,19 +28,51 @@ module.exports = {
api: [
{
title: 'BaseTable',
path: '/api/basetable',
path: `/api/${`basetable`.toLowerCase()}`,
Copy link
Owner

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

Copy link
Collaborator Author

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"
  },
  // ...
]

Copy link
Collaborator Author

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.

path: `/api/${`TableRow`.toLowerCase()}`,
},
{
title: 'TableHeader',
Copy link
Owner

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

@kohakukun kohakukun merged commit 64d5df3 into kohakukun:typescript_port Oct 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants