BUILDING.md
The minimal supported version of NodeJS for development is 22.3.
Note: you need to run npm install in both the root directory and the website directory before you can run the lint tests.
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 as tsc, 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 foundnpm run rollup - runs Rollup to bundle codenpm run build - compiles source code and bundles it (as one word for npm run tsc && npm run rollup)npm run build:prod - the same as npm run build, but also bundles production (minified) buildsnpm run lint - runs lint for the codenpm run test - runs unit-testsThere are several included e2e tests available which can be run individually. Please have a read through the following document for further information: /tests/README.md
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, follow the instructions in /debug/README.md to create a sandbox for developing in.
Android and iOS pages (only if the mobile package version is also updated).npm run docusaurus docs:version MAJ.MIN in website folder to create new versioned docs.
Note that there is not patch version in docs, only major and minor parts.import-lightweight-charts-version.ts: add a package reference for that version to website/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.lightweight-charts package version in website/package.json file.vMAJ.MIN.PATCH (see other tags).npm run prepare-release in the root folder.npx publint and ensure that there aren't any issues with the generated package.json.npm publish to publish changes to npm.package.json file after prepare-release script.package.json file to the next one (either major or minor depending on the planning and expected breaking changes).These steps are similar to those listed above except that we don't need to do anything related to the documentation site. There isn't typically anything to commit to the repo when doing these steps.
package.json, set version to a prerelease version, e.g. 2.0.0-rc1, 3.1.5-rc4,...npm run prepare-release in the root folder.npx publint@latest and ensure that there aren't any issues with the generated package.json.npm publish --tag next to publish changes to npm. Use --dry-run if you are unsure.