Skip to content
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

Refactoring for janus.js release on npm #3220

Merged
merged 5 commits into from May 19, 2023
Merged

Refactoring for janus.js release on npm #3220

merged 5 commits into from May 19, 2023

Conversation

atoppi
Copy link
Member

@atoppi atoppi commented May 12, 2023

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

  • package.json in the project root has been removed
  • js modules are now built under npm/dist
  • ./npm/package-lock.json has been added (deps versions updated)
  • ./npm/package.json has been refactored

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.

@atoppi atoppi changed the title Refactor for janus.js release on npm Refactoring for janus.js release on npm May 12, 2023
@lminiero
Copy link
Member

Merging 👍

@lminiero lminiero merged commit e7c2c24 into master May 19, 2023
8 checks passed
@lminiero lminiero deleted the npm-release branch May 19, 2023 09:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants