-
Notifications
You must be signed in to change notification settings - Fork 30k
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
doc: add "Hello world" example for N-API #17425
doc: add "Hello world" example for N-API #17425
Conversation
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.
LGTM modulo style nit.
doc/api/addons.md
Outdated
napi_status status; | ||
napi_value fn; | ||
|
||
status = napi_create_function(env, NULL, 0, Method, NULL, &fn); |
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.
nullptr (2x)
Our Addons documentation has a "Hello world" example that outlines all steps to build it. Adding the sources for this "Hello world" example for N-API.
4d9b7fb
to
7d4e033
Compare
return greeting; | ||
} | ||
|
||
napi_value init(napi_env env, napi_value exports) { |
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.
init should be uppercase by convention?
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.
The simple addon example on that page uses lower case.
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.
LGTM once nits are addressed
Looks good to go: ci run: https://ci.nodejs.org/job/node-test-pull-request/11951/ |
Landed in 5279035 |
Our Addons documentation has a "Hello world" example that outlines all steps to build it. Adding the sources for this "Hello world" example for N-API. PR-URL: #17425 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Our Addons documentation has a "Hello world" example that outlines all steps to build it. Adding the sources for this "Hello world" example for N-API. PR-URL: #17425 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Our Addons documentation has a "Hello world" example that outlines all steps to build it. Adding the sources for this "Hello world" example for N-API. PR-URL: #17425 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Our Addons documentation has a "Hello world" example that outlines all steps to build it. Adding the sources for this "Hello world" example for N-API. PR-URL: #17425 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Our Addons documentation has a "Hello world" example that outlines all steps to build it. Adding the sources for this "Hello world" example for N-API. PR-URL: #17425 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Rich Trott <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: James M Snell <[email protected]>
Our Addons documentation has a "Hello world" example that
outlines all steps to build it. Adding the sources for this
"Hello world" example for N-API.
Checklist
Affected core subsystem(s)
doc