Since the recent addition of the engine
and widgets
workspaces has changed the folder structure of CesiumJS quite a bit, we hope to provide some guide for migrating code changes from the older structure to the latest one.
First, you’ll want to merge in the latest changes:
# Fetch latest tags from origin. Note that if you are working on a fork, then instead of origin, you will use upstream.
git fetch --tags origin
# Merge in latest changes from 1.99 (pre-workspace)
git merge 1.99
# Merge in latest changes from after workspaces PR was merged.
git merge post-workspaces
At this stage, you may see some merge conflicts. We expect that most of these can be resolved following these steps:
- Move new files from the root level
Source
folder to theSource
folder of the appropriate workspace. Any file that was originally inSource/Widgets
(exceptCesiumWidget
) should go into thewidgets
workspace. Anything else goes in theengine
workspace. - Ensure that the imports are updated correctly:
- For files in
Specs
, imports for common test functions likecreateScene
will need to be updated. - For files in
Specs
, imports for the workspace they are testing will need to be imported. Instead of importing from the root levelCesium.js
file, you will need to import from theindex.js
at the root of the workspace. This file is generated once you run thebuild
script. - Any imports from another workspace should be imported from the package name.
- For files in
- Delete any new files that are in the root level
Source
folder.
If you run into any more issues, please let us know.