Skip to content

jfayot/replaceCesiumDefaultValue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

replaceCesiumDefaultValue

This tool allows automating the migration from Cesium.defaultValue to javascript's nullish coalescing operator ?? (see Cesium Issue #11674 and PR #12507).

It worked as is on Cesium repository, but you may need to adapt it for your personal use case. Some known limitations are:

  • comments inside defaultValue calls,
  • more than 2 intricate calls to defaultValue,
  • works only for ES6 imports, not for require,
  • ...

Source code has no comment nor documentation (sorry about that 😕) but if you have any question don't hesitate to ask...

To work properly, you will need prettier installed, either globally, or in your project. This is to get rid of extraneous parenthesis introduced by the migration tool.

Usage

git clone https://github.com/jfayot/replaceCesiumDefaultValue.git
cd replaceCesiumDefaultValue
npm install
npm run build
node dist/index.js <path/to/your/project>
cd <path/to/your/project>
npm run prettier

About

Migrates Cesium.defaultValue to ??

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published