There are a few steps we need to take to create a combined build. These are as follows:
First, we will remove our JavaScript code from the HTML page and create a separate file for it. Go ahead and copy the contents of the
<script>
tag that contains all the JavaScript code into a file and save it asflickr_combined.js
. You can, of course, call it something different but the remainder of this example will refer to it by this name. If you choose a different name, make sure to change all the references appropriately.Now, delete the JavaScript and the script tag from your HTML file. At this point, we can create a new
<script>
tag to loadflickr_combined.js
and everything should work as before. If you want to try this, go ahead but remember to remove the script tag afterwards. We won't be usingflickr_combined.js
directly.In order for the closure compiler to find the exact parts of OpenLayers that our application needs, we need to tell it...