2.2 KiB
How to publish vis.js
This document describes how to publish vis.js.
Build
-
Change the version number of the library in both
package.jsonandbower.json. -
Open
HISTORY.md, write down the changes, version number, and release date. -
Build the library by running:
npm prune npm update npm run build
This generates the vis.js library in the folder ./dist.
Test
-
Test the library:
npm test -
Open some of the examples in your browser and visually check if it works as expected.
Commit
-
Commit the changes to the
developbranch. -
Merge the
developbranch into themasterbranch. -
Push the branches to github
-
Create a version tag (with the new version number) and push it to github:
git tag v3.1.0 git push --tags
Publish
-
Publish at npm:
npm publish -
Test the published library:
-
Go to a temp directory
-
Install the library from npm:
npm install visVerify if it installs the just released version, and verify if it works.
-
Install the library via bower:
bower install visVerify if it installs the just released version, and verify if it works.
-
Verify within a day or so whether vis.js is updated on http://cdnjs.com/
-
Update website
-
Copy the
distfolder from themasterbranch to thegithub-pagesbranch. -
Copy the
docsfolder from themasterbranch to thegithub-pagesbranch. -
Copy the
examplesfolder from themasterbranch to thegithub-pagesbranch. -
Create a packaged version of vis.js. Go to the
masterbranch and run:zip vis.zip dist docs examples README.md HISTORY.md CONTRIBUTING.md LICENSE* NOTICE -r -
Move the created zip file
vis.zipto thedownloadfolder in thegithub-pagesbranch. TODO: this should be automated. -
Check if there are new or updated examples, and update the gallery screenshots accordingly.
-
Update the library version number in the index.html page.
-
Update the CDN links at the download section of index.html AND the CDN link at the top.
-
Commit the changes in the
gh-pagesbranch.
Prepare next version
- Switch to the
developbranch. - Change version numbers in
package.jsonandbower.jsonto a snapshot version like0.4.0-SNAPSHOT.