The minimal supported version of NodeJS for development is 16.13.
npm run tsc
- compiles the source code only (excluding tests)npm run tsc-watch
- runs the TypeScript compiler in the watch mode for source code (same astsc
, but in the watch mode)npm run tsc-verify
- compiles everything (source code and tests) with composite projects config to ensure that no invalid imports or cyclic deps are found
npm run rollup
- runs Rollup to bundle codenpm run build
- compiles source code and bundles it (as one word fornpm run tsc && npm run rollup
)npm run build:prod
- the same asnpm run build
, but also bundles production (minified) builds
npm run lint
- runs lint for the codenpm run test
- runs unit-tests
-
You can use the following command to make sure that your local copy passes all (almost) available checks:
npm run verify
-
If you want to play with a locally built package, you can create a
debug.html
page:cp debug.html.example debug.html
.This file (
debug.html
) is under gitignore, so you don't need to worry about changing it and you can modify it as you wish.
- Run
npm run docusaurus docs:version MAJ:MIN
inwebsite
folder to create new versioned docs. Note that there is not patch version in docs, only major and minor parts. - (optional) Remove docs for the oldest version (see https://docusaurus.io/docs/versioning#deleting-an-existing-version).
- Handle the new version in
import-lightweight-charts-version.ts
: add a package reference for that version towebsite/package.json
(e.g."lightweight-charts-MAJ.MIN": "npm:lightweight-charts@~MAJ.MIN.0"
) and a import of that package in a matching case statement. - Bump
lightweight-charts
package version inwebsite/package.json
file. - Add all created files to git and commit changes. Note that at this step the website cannot work since it uses unpublished so far version. It will be fixed in the next steps.
- Create a git tag for this version with the format
vMAJ.MIN.PATCH
(see other tags). - Run
npm run prepare-release
in the root folder. - Run
npm publish
to publish changes to npm. - Revert changes made in
package.json
file afterprepare-release
script. - Bump the library's version in root
package.json
file to the next one (either major or minor depending on the planning and expected breaking changes). - Push the changes back to github (don't forget to push tags).
- Create and publish a release on github.
- Close the milestone.