2014-06-01 03:08:17 +08:00
|
|
|
# How to publish jsoneditor
|
|
|
|
|
|
|
|
This document describes the steps required to publish a new version of jsoneditor.
|
|
|
|
|
|
|
|
|
|
|
|
## Update version number
|
|
|
|
|
2015-12-31 21:24:13 +08:00
|
|
|
Update the version number in package.json.
|
2014-06-01 03:08:17 +08:00
|
|
|
|
2019-01-16 22:59:11 +08:00
|
|
|
Update package-lock.json:
|
|
|
|
|
|
|
|
npm install
|
|
|
|
|
2014-06-01 03:08:17 +08:00
|
|
|
|
|
|
|
## Update history
|
|
|
|
|
|
|
|
Update the date and version number in the file HISTORY.md. Verify whether all
|
|
|
|
changes in the new version are described.
|
|
|
|
|
|
|
|
|
2015-03-01 04:17:03 +08:00
|
|
|
## Test the library
|
|
|
|
|
|
|
|
Run the unit tests and validate whether all tests pass:
|
|
|
|
|
|
|
|
npm test
|
|
|
|
|
|
|
|
|
2014-06-01 03:08:17 +08:00
|
|
|
## Build library
|
|
|
|
|
|
|
|
Build the build (jsoneditor.js, jsoneditor.css, ...) files by running:
|
|
|
|
|
|
|
|
npm run build
|
|
|
|
|
|
|
|
After the build is complete, verify if the files are updated and contain the
|
|
|
|
correct date and version number in the header.
|
|
|
|
|
|
|
|
|
|
|
|
## Test
|
|
|
|
|
2018-07-28 21:34:18 +08:00
|
|
|
Test whether the npm library is ok by opening some examples, and check whether
|
|
|
|
the files under `dists` are created and have contents.
|
2014-06-01 03:08:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
## Commit
|
|
|
|
|
|
|
|
- Commit the final code.
|
|
|
|
- Merge the develop branch into the master branch.
|
|
|
|
- Push to github.
|
|
|
|
|
|
|
|
If everything is well, create a tag for the new version, like:
|
|
|
|
|
|
|
|
git tag v1.2.4
|
|
|
|
git push --tags
|
|
|
|
|
|
|
|
|
|
|
|
## Publish
|
|
|
|
|
|
|
|
Publish to npm:
|
|
|
|
|
|
|
|
npm publish
|
|
|
|
|
|
|
|
|
2014-07-29 03:11:55 +08:00
|
|
|
## Test published library
|
2014-06-01 03:08:17 +08:00
|
|
|
|
|
|
|
Install the libraries locally and test whether they work correctly:
|
|
|
|
|
|
|
|
cd tmp-folder
|
2014-07-29 03:11:55 +08:00
|
|
|
npm install jsoneditor
|
|
|
|
bower install jsoneditor
|
2014-06-01 03:08:17 +08:00
|
|
|
|
|
|
|
|
|
|
|
## Done
|
|
|
|
|
|
|
|
Congrats, be proud.
|
|
|
|
|