Time for Action – building a Config file
Let's take a look at how to write a build config file.
Copy the
lite.cfg
file found in the build directory and name the copied versionexample_1.cfg
(or whatever you'd like, but that's what we'll refer to it as).Let's manually specify some files. We'll add in a couple controls. Add in the following and then save the file. The full file should look like this:
# Config File [first] OpenLayers/SingleFile.js OpenLayers.js OpenLayers/BaseTypes.js OpenLayers/BaseTypes/Class.js OpenLayers/Util.js [last] [include] OpenLayers/Map.js OpenLayers/Layer/WMS.js OpenLayers/Control/LayerSwitcher.js OpenLayers/Control/Navigation.js OpenLayers/Control/Scale.js [exclude]
What Just Happened?
We just created a configuration file for our build named example_1.cfg
. We'll be using this file to build the OpenLayers.js
file. Notice that we did not have to include the base Control.js
class—the build script will automatically look for and include the dependencies...