How to build cesium after edits to source javascript file

1. A concise explanation of the problem you're experiencing.

Advice on how to re-create a local version of the cesium.js file after making minor edits to one of the modules (layerimagefeatureinfo.js).

3. Context. Why do you need to do this? We might know a better way to accomplish
your goal.

I am using the excellent tutorial https://cesium.com/blog/2016/05/18/an-introduction-to-cesium-android-apps-with-cordova/ as a base for creating a basic android app.

Following the tutorial, I copied directory Cesium from the build subdirectory (downloaded from cesium.org) into www/ directory. That all worked fine. But I have had to make minor changes to layerimagefeatureinfo.js so I need to re-create the Cesium directory so that my changes are included in cesium.js.

This is probably a straighforward thing to do but as a beginner I am not sure what to do next!

4. The Cesium version you're using, your operating system and browser.
Cesium 1.42, Windows 10, Firefox and Chrome.

Hi there,

You would make the change in the “Source” directory, then run the command npm run combine to build the source code. Here’s the Cesium Build Guide for a description of all the build commands.

Thanks,

Gabby

thanks - i've done that and everything working great!

hi gabby ,how to build the source code after some edits in new version, i cant see a combine option,thx a lot :rose: :rose: :rose:

Hi @King_Monkey, here’s the updated link to the build guide. combine is no longer a script. You can run build instead.

hi gabby , i make some change in source code in packages/widgets/Source/Viewer/viewer.js(i clone main branch), i run build and open hello word but cant find my change in new build Cesium,i read the link Build Tooling Updates Coming to CesiumJS – Cesium, do i need edit the gulp file myself? thx a lot :rose:

Hi @King_Monkey,

You should be able to run npm start. This will start the server and build any new changes. Then you should be able to access localhost:8080 and the various apps like Hello World to see your changes.