Closed albincorreya closed 2 years ago
The library is already available (and has been) on NPM: https://www.npmjs.com/package/edo.js Do I need to include this fact explicitly in the documentation somehow?
In any case I also added the library to the release page
The library is already available (and has been) on NPM
okay, nice!
In any case I also added the library to the release page
I can see only your source code has been released here. Usual best practice is to add your build files as well on GitHub releases since the source code will be automatically tagged and archived by Github. In your case, upload the zip file you get when you do npm publish
command to publish the library to NPM. Also, it would be nice to explicitly mention the dirs and files you want to publish your package.json
file so that unnecessary files won't be pushed to NPM. Check this out for a reference.
Do I need to include this fact explicitly in the documentation somehow?
Yes, since users will be installing the library either from NPM/ CDN or from downloaded releases on GitHub releases.
Install npm install edojs
Import like
// NOTE: here no relative path so node will use the edojs installed from NPM
const EDO = require("edo.js").EDO;
#### CDN source example - https://www.jsdelivr.com/package/npm/edo.js?version=1.2.14&path=dist
```html
<script src="https://cdn.jsdelivr.net/npm/edo.js@1.2.14/dist/edo.js"></script>
Similarly, you can do any type of import.
Explicitly listed the files in package.json Updated readme Uploaded the zip from the npm publish to the releases
Should this be closed?
Currently, it looks like the only way to use
edoJS
is by cloning the source code from the repository.It is a good practice to version and release the library on the release page and/or NPM. At least having it on release page would be sufficient for the review.
Sharing in case, SemVer website can be useful to decide on how to version the releases.
Nice to have (optional)
I highly suggest publishing it on NPM since it will be very useful for developers to use your library in their web projects without cloning the repository. It also comes with some free built-in benefits such as,
edo.js
from CDN (eg. JSDeliver)npm install edo.js
).Publishing the package to NPM is quite straightforward.
Hope this helps! Let me know if there is anything unclear.