Monorepo for iTwin.js Library
Copyright © Bentley Systems, Incorporated. All rights reserved. See LICENSE.md for license terms and full copyright notice.
iTwin.js is an open source platform for creating, querying, modifying, and displaying Infrastructure Digital Twins.
If you have questions, or wish to contribute to iTwin.js, see our Contributing guide.
This repository is a monorepo that holds the source code to multiple iTwin.js npm packages. It is built using Rush.
See rush.json for the complete list of packages and Versioning.md for package and API versioning policies.
Each package has its own node_modules directory that contains symbolic links to common dependencies managed by Rush.
npm install -g @microsoft/rush
rush install
.See supported platforms for further information.
git clone
or pull updates to the repository (subsequent times) with git pull
rush install
rush clean
rush build
rush cover
The -v
option for rush
is short for --verbose
which results in a more verbose command.
The above commands iterate and perform their action against each package in the monorepo.
If you get an error similar to the following, it means that the repo has stopped making use of an npm package that was used in the past.
[Error: ENOENT: no such file or directory, stat '/.../itwinjs-core/test-apps/display-test-app/node_modules/@bentley/react-scripts']
To fix this build error, you should completely remove the node_modules directory that is referenced in the error with rush purge
, and then rerun rush install
.
For incremental builds, the rush build
command can be used to only build packages that have changes versus rush rebuild
which always rebuilds all packages.
Note: It is a good idea to
rush install
after eachgit pull
as dependencies may have changed.
rush cover
rush lint
git commit
(or use the Visual Studio Code user interface)rush extract-api
. This will update the signature files, located in common/api
. Note: before doing this, first do the following:
git merge origin/master
)rush clean
rush build
common/api
directory to ensure they are compatible with the intended release of the package.
rush change
rush change
will indicate that a changelog entry is not needed.rush change
prompts will cause new changelog entry JSON files to be created.If using the command line, steps 8 through 11 above can be completed in one step by running rushchange.bat
from the imodeljs root directory.
Only use rushchange.bat
if none of the changes require a changelog entry.
Note: The CI build will break if changes are pushed without running
rush change
andrush extract-api
(if the API was changed). The fix will be to complete steps 6 through 11.
Here is a sample changelog to demonstrate the level of detail expected.
The version numbers of internal dependencies should not be manually edited. These will be automatically updated by the overall version bump workflow. Note that the packages are published by CI builds only.
Use these instructions to update dependencies and devDependencies on external packages (ones that live outside of this monorepo).
package.json
file to update the semantic version rangerush check
to make sure that you are specifying consistent versions across the repositoryrush update
to make sure the newer version of the module specified in #1 is installedrush docs
cd core\backend
and then npm run docs