Copyright © Bentley Systems, Incorporated. All rights reserved.
iModel.js is an open source platform for creating, querying, modifying, and displaying Infrastructure Digital Twins.
If you have questions, or wish to contribute to iModel.js, see our Contributing guide.
This repository is a monorepo that holds the source code to several iModel.js npm packages. It is built using Rush.
See rush.json for the list of packages:
Directory | npm package |
---|---|
clients/context-registry |
@bentley/context-registry-client |
clients/extension-client |
@bentley/extension-client |
clients/forms-data-management |
@bentley/forms-data-management-client |
clients/frontend-authorization |
@bentley/frontend-authorization-client |
clients/imodelhub |
@bentley/imodelhub-client |
clients/itwin |
@bentley/itwin-client |
clients/product-settings |
@bentley/product-settings-client |
clients/projectshare |
@bentley/projectshare-client |
clients/rbac |
@bentley/rbac-client |
clients/reality-data |
@bentley/reality-data-client |
clients/usage-logging |
@bentley/usage-logging-client |
core/backend |
@bentley/imodeljs-backend |
core/bentley |
@bentley/bentleyjs-core |
core/common |
@bentley/imodeljs-common |
core/frontend |
@bentley/imodeljs-frontend |
core/geometry |
@bentley/geometry-core |
core/i18n |
@bentley/imodeljs-i18n |
core/markup |
@bentley/imodeljs-markup |
core/quantity |
@bentley/imodeljs-quantity |
presentation/backend |
@bentley/presentation-backend |
presentation/common |
@bentley/presentation-common |
presentation/components |
@bentley/presentation-components |
presentation/frontend |
@bentley/presentation-frontend |
ui/components |
@bentley/ui-components |
ui/core |
@bentley/ui-core |
ui/framework |
@bentley/ui-framework |
ui/ninezone |
@bentley/ui-ninezone |
Each package creates its own node_modules directory that contains symbolic links to common dependencies managed by Rush.
- Git
- Node: an installation of the latest security patch of Node 12. The Node installation also includes the npm package manager.
- Rush: to install
npm install -g @microsoft/rush
- TypeScript: this is listed as a devDependency, so if you're building it from source, you will get it with
rush install
. - Visual Studio Code: an optional dependency, but the repository structure is optimized for its use
See supported platforms for further information.
- Clone repository (first time) with
git clone
or pull updates to the repository (subsequent times) withgit pull
- Install dependencies:
rush install
- Clean:
rush clean
- Rebuild source:
rush rebuild
- Run tests:
- All tests:
rush test
- Core tests:
npm test -s
- UI tests:
npm run test:ui -s
- Presentation tests:
npm run test:presentation -s
- All tests:
The -s
option for npm
is short for --silent
which results in a less verbose command.
That part of the command is optional depending on the desired verbosity level.
Note that all build instructions are designed to run from the imodeljs-core root directory. The above commands iterate and perform their action against each package in the monorepo.
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.
- Make source code changes on a new Git branch
- Ensure unit tests pass when run locally:
rush test
- Locally commit changes:
git commit
(or use the Visual Studio Code user interface) - Repeat steps 1-3 until ready to push changes
- Add changelog entry (which could potentially cover several commits):
rush change
- Follow prompts to enter a change description or press ENTER if the change does not warrant a changelog entry. If multiple packages have changed, multiple sets of prompts will be presented. If the changes are only to non-published packages (like display-test-app), then
rush change
will indicate that a changelog entry is not needed. - Completing the
rush change
prompts will cause new changelog entry JSON files to be created. - Check for API signature changes:
rush extract-api
. This will update the signature files, located incommon/api
. - Review any diffs to the API signature files in the
common/api
directory to ensure they are compatible with the intended release of the package - Commit the changelog JSON files and any API signature updates.
- Publish changes on the branch and open a pull request.
If using the command line, steps 5 through 7 above can be completed in one step by running rushchange.bat
from the imodeljs-core root directory.
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 5 through 10.
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).
- Edit the appropriate
package.json
file to update the semantic version range - Run
rush check
to make sure that you are specifying consistent versions across the repository - Run
rush update
to make sure the newer version of the module specified in #1 is installed
- Build TypeDoc documentation for all packages:
rush docs
- Build TypeDoc documentation for a single package:
cd core\backend
and thennpm run docs
The full list of npm scripts can be found in the root package.json
file.