Skip to content
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

Documentation push on node-add-api #280

Closed
mhdawson opened this issue Oct 12, 2017 · 36 comments
Closed

Documentation push on node-add-api #280

mhdawson opened this issue Oct 12, 2017 · 36 comments
Milestone

Comments

@mhdawson
Copy link
Member

No description provided.

@mhdawson mhdawson added this to the Milestone 9 milestone Oct 12, 2017
@mhdawson
Copy link
Member Author

@mhdawson
Copy link
Member Author

Cory is going to take a first cut at the outline of the doc, then we'll figure out how to split up the work of moving it forward.

@NickNaso
Copy link
Member

NickNaso commented Oct 17, 2017

Here I report some points that in my opinion we have to insert and disccuss about documentation

  • What is Node Addon API (litle overview)

  • Reasons and motivations behind the Node Addon API

  • Quick start (Very small instructions that allow to start in a fast way)

  • Links - reference to more specific parts of the documentation that will be in separate files and treat the following arguments:

    • Installation and usage

    • What is and how to use Environments

    • Scope and EscapableScope

    • What is and how to use Value

    • Creates a JS value from a C++ primitive

    • Creates C++ value from JS value

    • Buffer and TypedArray (They are particular JavaScript object and maybe we need to deepen their usage)

    • Javascript Properties

    • JavaScript Functions

    • Error handling (How to handle the error)

    • ObjectWrap (What is and how to use)

      • Little migration guide to pass from Nan::ObjectWrap
    • AsyncWorker (How to create async function)

      • Little migration guide to pass from Nan::AsyncWorker
    • How to create a module

      • Register a module
      • binding.gyp configuration (Link to some useful resources because sometimes it's very hard to find the right settings)
      • Generator for scaffolding a project of native addon
      • Useful reources tools that help to be more productive
      • Link to the examples (Consider the creation of some complex examples)
    • Conversion tool (How to use and which types of tasks it does for us)

    • News and Updates

At moment there isn't a changelog file it's important to me know the changes happened and maybe the rationale behind them.

After we will write the documentation we could consider the usage of a tool like docsify that will help us to generate site starting from markdown files.

@corymickelson
Copy link

corymickelson commented Oct 17, 2017 via email

@NickNaso
Copy link
Member

@corymickelson don't worry for me it's good to know that we are aligned on what we have to do.
I think that based on this proposal we can discuss on how to split our work.
The first step could be define some guidelines that we have to follow on writing documentation so at the end even if we split the tasks all will be similar and coherent.

@corymickelson
Copy link

corymickelson commented Oct 17, 2017 via email

@jschlight
Copy link
Collaborator

Markdown works for me. I do not have a preference between Docsify and MkDocs.

@NickNaso
Copy link
Member

Yes for me markdown is the right solution and then after this first step we can use one of the available tools out there to make the documentation more usable.
If you want in this week I can start to write something for the Setup part

@digitalinfinity
Copy link
Contributor

+1 for Markdown. One thing that @jasongin and I talked about a while back was whether we should have some documentation in the header file itself that we could extract out at package creation or build time to produce the API documentation automatically- it has some nice benefits in that if someone is using an IDE for developing their addon, the documentation for the API they're using can be made available within their IDE. My personal view is that it would be awesome if we could have API docs in the headers and have something that extracts them out and combines them with the other markdown documentation but I'll defer to y'all 😄

@corymickelson
Copy link

corymickelson commented Oct 17, 2017 via email

@mhdawson
Copy link
Member Author

Markdown makes sense to me a well as that is what the standard Node.js API doc is in.

@mhdawson
Copy link
Member Author

mhdawson commented Oct 23, 2017

Probably good to review this Issue to make sure we cover the issues mentioned there:

nodejs/node-addon-api#91

@jschlight
Copy link
Collaborator

I am close to being ready to upload the first draft of the documentation I've been working on for review and criticism. What's the best way to go about that?

@corymickelson
Copy link

corymickelson commented Oct 25, 2017 via email

@mhdawson
Copy link
Member Author

mhdawson commented Oct 25, 2017

Also of note nodejs/node-addon-api#162

@mhdawson
Copy link
Member Author

A fork of the node-addon-api would be best in my opinion. You can then submit a PR against the main repo which is often the easiest way for people to review/comment as they can add comments on specific lines.

@jschlight
Copy link
Collaborator

I've just added a pull request nodejs/node-addon-api#165

@NickNaso
Copy link
Member

Hi guys I started yesterday to work on documentation beginning from the readme file this evening I will pass to setup part all is present here https://github.com/NickNaso/node-addon-api but at moment is all a working progress work if you want I can make a PR

@corymickelson
Copy link

@jschlight Can you meet @NickNaso and myself tomorrow around noon (pacific time) on google hangout to go over documentation work.

@jschlight
Copy link
Collaborator

Yes. I'm available and have got it on my calendar.

@mhdawson
Copy link
Member Author

@NickNaso took a quick look at https://github.com/NickNaso/node-addon-api and looks like you have a good start on a number of areas. A PR would make it easier to comment/discuss and also lets us land it in the repo after discussion (even if its not fully complete yet).

@NickNaso
Copy link
Member

NickNaso commented Nov 16, 2017

Just ended documentation for setup, added sections tests - examples on readme
See: nodejs/node-addon-api#182

@NickNaso
Copy link
Member

NickNaso commented Mar 1, 2018

Hi everyone,
about documentation I did some research and tested some tools that we could use after we will finish to write the markdown.
I report two of them:

  • Docusaurus - created and used by Facebook - It allow to addcustom page, handle the versioning and the research inside the doc.
  • Metalsmith - usually is used to build static website and support the markdown. (It's used to build documentation of fastify framework)
    Personally I prefer Docusaurus. What do you think about that? Someone of you have some others ideas or tools to propose?

@mhdawson
Copy link
Member Author

mhdawson commented Mar 1, 2018

These tools are used to manage md files? At some point we may want to integrate the docs here into the Node.js docs and think we want to avoid using a tool that might prevent that. Lets discuss in one of our upcoming meetings.

@mhdawson mhdawson removed this from the Milestone 9 milestone Mar 15, 2018
@mhdawson
Copy link
Member Author

mhdawson commented Apr 9, 2018

@NickNaso thanks for putting that together.

@mhdawson
Copy link
Member Author

mhdawson commented Apr 12, 2018

Hitesh
Basic Types
Array
Symbol
String
Name

Michael
Object Lifettime Management
HandleScope
EscapableHandleScope

Kyle
Buffer
ArrayBuffer
TypedArray
TypedArrayOf

Anisha
Reference
External
Object
ObjectReference
PropertyDescriptor

Nick
Error
AsyncWorker
Function
FunctionReference
ObjectWrap
ClassPropertyDescriptor

@kfarnung
Copy link
Contributor

kfarnung commented May 2, 2018

Opened nodejs/node-addon-api#256 for ArrayBuffer and Buffer.

@NickNaso
Copy link
Member

NickNaso commented May 3, 2018

Opened nodejs/node-addon-api#259 for error handling

@NickNaso
Copy link
Member

Opened nodejs/node-addon-api#272 for asynchronous operation It's a first step I need review and suggestion to improve the doc.

@mhdawson
Copy link
Member Author

We need to look at DataView as well.

@mhdawson
Copy link
Member Author

mhdawson commented Jul 5, 2018

Nick
Function
FunctionReference
ObjectWrap
ClassPropertyDescriptor

Anisha
ObjectReference
PropertyDescriptor

Kyle
Buffer
ArrayBuffer
TypedArray
TypedArrayOf

@mhdawson
Copy link
Member Author

mhdawson commented Jul 5, 2018

@kfarnung are you going to get to those tagged with your name above? We would like to get done by Node Summit. If necessary we can split them up to get some people to do one or more of them.

@mhdawson
Copy link
Member Author

mhdawson commented Jul 5, 2018

In addition to completing the remaining sections above we should

  • Update documentation so that we include the Napi namespace consitently. Ie Napi::Value instead of Value
  • review to see if everything is covered
  • remove the remaining comments about things being under development.

@kfarnung
Copy link
Contributor

kfarnung commented Jul 5, 2018

I'll plan to get the remaining two done next week.

@mhdawson
Copy link
Member Author

Thanks to everybody for all of the hard work. Now that nodejs/node-addon-api#335 landed I think we can close this. We will continually refine/improve the documentation but now it is complete and in reasonable shape to make sure we maintain coverage.

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

No branches or pull requests

7 participants