MichaelSel / edoJS

A set of functions for manipulating musical pitches within a given EDO
GNU Affero General Public License v3.0
5 stars 0 forks source link

[Code] Publish releases of library on Github releases and/or NPM #11

Closed albincorreya closed 2 years ago

albincorreya commented 2 years ago

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,

Publishing the package to NPM is quite straightforward.

Hope this helps! Let me know if there is anything unclear.

MichaelSel commented 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

albincorreya commented 2 years ago

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.

Node.js example

#### 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.

MichaelSel commented 2 years ago

Explicitly listed the files in package.json Updated readme Uploaded the zip from the npm publish to the releases

MichaelSel commented 2 years ago

Should this be closed?