Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR is an experimental approach to tackle different subjects through the creation of an additional package @cesium/utils (I realize that it could be renamed @cesium/utility to match cesium native component):
For the moment, only a few files have been moved to the new package @cesium/utils:
Corresponding Specs have been moved too, but unit test FeatureDetection / "detects WebGL2 support" had to be removed as it pulled unwanted dependency Scene.
There have been some imports reordering during the process, which makes quite a lot of modified files. This is because I temporarily used organize-imports-cli. This could be added as a lint-stage.
For the documentation generation, I'm still using jsdoc comment headers, but as it is with typescript files, I had to use the jsdoc-babel plugin. It works quite well, and allows to keep consistent doc across js and ts. But it could be interesting to evaluate other tools such as typedoc which are specifically made for typescript.
For the declaration types, I'm using the one bundled by dts vite plugin, and then inserting it at the end of Cesium.d.ts (see function createTypeScriptDefinitions).
If this approach is something you'd like to continue with, let me know, so that we can agree on what to put inside @cesium/utils, and help me identify what's missing in the build / ci scripts (for instance debug pragma strip out...)
Issue number and link
Addresses following issues:
Testing plan
Author checklist
CONTRIBUTORS.md
CHANGES.md
with a short summary of my change