Today I had to modify the code to resolve a bug.
While this modification was really trivial, the build process slow me down and I took much more time to complete this task.
I use the Build guide (https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Documentation/Contributors/BuildGuide/README.md) and follow its indication.
The guide looks straight-forward :
"Once all modules have been installed, run npm run build to actually build the code
npm run build
Cesium ships with a simple HTTP server for testing, run npm start after building to use it:
Then browse to http://localhost:8080/."
Reading that it seems that a simple "npm run build" would be enough to build the code and reflect the changes to apps using it (CesiumViewer, HelloWorld, customApp, etc.).
It is not.
But there are more informations following this in the guide. So after you realize that this is not sufficient to have a proper build, you come back to the build guide.
However, that information is not clear enough.
If you add "buildApps", you'll have CesiumViewer and Sandcastle working but not HelloWorld. That's weird. Especially when HelloWorld should be the first thing to work as it is the simplest possible application and is located in the Apps directory.
So you look back to the guide and don't really understand what you did wrong but finally decide to go to build the "release" option.
And everything works fine but it took a really long time to build.
So you go back to your code edition.
For testing purpose, you create a sample webpage cloned from HelloWorld app to test your modification.
When you are done editing you try to use "npm run build" to reflect the change in the source code, hoping that it would be enough, as you don't want to rebuild with the "release" option (really long).
But it did not work. It seems like no changes happened in your sample webpage.
So you check that you did everything correctly in the Cesium Source code. Re-build Cesium... and still nothing.
After some time you realize you actually need to use "release" again for the change to happens (or maybe "combine" is enough ?)
That is just my personnal experience with the build process. So I think this build guide might be enhance in a few way :
- Indicate clearly that the "build" script might not be enough depending on what you want to do.
- Clearly highlight what is the proper way to build all of Cesium
- Explain how to use AMD in a custom application. Give a simple example related to Cesium (the link provided is honestly too arid for a first approach)
- If you don't want to use AMD, indicate what is the proper script to use.
- break down "Build scripts" part. As it is, there is simply too much information to get what is important.