To get an overview of the project, read the README and examples
- Make sure the version numbers in all package.json/package.lock.json file are updated with the newest version number
- Git tag the latest commit with the version number
- Make a test directory 'wayscript-js-test-publish' and copy the 'wayscript-js' directory over
- Clone this nexus-dockerized repository, follow the readme to get the application running at local and login to the application
- Create a repository, choose the category 'npm hosted' to create a local npm registry
- Credential setup, follow these steps to encode nexus server credentials and add the credentials to the npm configuration
Note: You may need to comment out the code in the npmrc file if it is not empty before adding the credential in
- Npm-hosted repository's set up and publish guide can be found here under 'Pushing Binaries to Nexus'
Note: Changes in config and publish in the above process should be made to 'wayscript-js-test-publish' test directory
- If test publish succeeded, remove the credentials added to npmrc file in the previous process
- Register/Login your npm account, ask wayscript admin for contribution permission and configure 2FA authentication
- Run
npm login
with your npm credentials - Run
npm publish --access public
in the repo, more details here
- If unexpected error in package, run
npm unpublish wayscript@<error version number>
to roll back to the previous version
Note: An unpublished version cannot be published again