meetecho / janus-gateway

Janus WebRTC Server
https://janus.conf.meetecho.com
GNU General Public License v3.0
8.25k stars 2.48k forks source link

Refactoring for janus.js release on npm #3220

Closed atoppi closed 1 year ago

atoppi commented 1 year ago

Since we have taken the ownership of the janus-gateway package on npm, this PR refactors the project for the release of janus.js in the npm public registry.

Potentially breaking changes

How janus.js packages will be published

We have added a prerelease script to ./npm/package.json that generates an ES version of janus.js through rollup under ./npm/dist/janus.es.js and copy janus.js under ./npm/src/janus.js

So basically the publishing cycle will be the following (remove --dry-run)

# update version in ./npm/package.json
# npm run prerelease
# npm publish --dry-run

The package published on npm will have the following contents:

README.md        ---> the README that will be shown on npm
dist/janus.es.js ---> the "main" of the package.json as generated by rollup
janus.d.ts       ---> the "types" of the package.json
package.json    
src/janus.js     ---> copied from "html/janus.js" when doing "npm run prerelease"

Feedbacks are very welcome, in particular about the project structure we defined and how we think to manage the release cycle.

lminiero commented 1 year ago

Merging :+1: