-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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: How to publish N-API package #1236
Conversation
running `npm install iotivity-node`. This will install the non-N-API version | ||
by default. The user will have to run `npm install iotivity-node@n-api` to | ||
receive the N-API version. | ||
|
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.
Nit: what do you think about adding a link to https://docs.npmjs.com/getting-started/using-tags?
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.
Done! Thanx
will not be installed if someone chooses to install `iotivity-node` by simply | ||
running `npm install iotivity-node`. This will install the non-N-API version | ||
by default. The user will have to run `npm install iotivity-node@n-api` to | ||
receive the N-API version. For more information on usig tags with npm check |
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.
There is a minor typo: "usig".
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.
oops :(
Thanx - fixed it.
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
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.
Some lite suggestions
- Then, publish the N-API version: | ||
- Update the version in `package.json`. For `iotivity-node`, the version | ||
becomes `1.2.0-3`. For version number, the field after the dash (-) allows | ||
quite a bit of flexibility to insert any text. e.g. `1.2.0-napi`. |
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.
[lite suggestion]Maybe link to http://semver.org/
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.
Done
running `npm install iotivity-node`. This will install the non-N-API version | ||
by default. The user will have to run `npm install iotivity-node@n-api` to | ||
receive the N-API version. For more information on using tags with npm check | ||
out https://docs.npmjs.com/getting-started/using-tags |
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.
[Suggestion] I would call the link by it's name:
check out ["Using dist-tags"](https://docs.npmjs.com/getting-started/using-tags).
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.
Done
} | ||
``` | ||
|
||
Note that, unlike regular versions, tagged versions cannot be addressed by |
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.
[suggestion]
- use new Note: convention doc: make the style of notes consistent node#13133
- refer to npm guild again
**Note:**
that,As explained in ["Using dist-tags"](https://docs.npmjs.com/getting-started/using-tags), unlike regular versions
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 if you're referring to it twice, you might as well use the
["Using dist-tags"][]
["Using dist-tags"]: https://docs.npmjs.com/getting-started/using-tags
format
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.
Done!
Thanx for all the reviews! Can someone please land this for me ? |
@fhemberger let me know if I did anything wrong. |
@gibfahn No worries, LGTM! |
@fhemberger - do we know when this change will show up on the website ? I have a N-API announcement blog coming up next week and would like to point to this content with an official URL. |
@aruneshchandra it is visible: https://nodejs.org/en/docs/guides/publishing-napi-modules/. Site is deployed on every push on master. |
Ah thanx! I see it now - for some reason I did not see it earlier :/ |
@aruneshchandra Site is cached by Cloudflare, it can sometimes take up to an hour for the changes to be visible. |
This guide provides a recommendation on how to publish an experimental N-API package for easy discovery.