odoe

Custom local builds with ArcGIS JS API

Blog Post created by odoe on Nov 18, 2015

esri-builder.png

Earlier this week, Esri announced the release of a Bower package for the ArcGIS API for JavaScript. This opens up another channel by which users can leverage to create custom builds of their applications.

 

Currently, you can use the JavaScript Optimizer to create and host a custom build of the ArcGIS JS API. If you wanted to take it a bit further and try to create a custom build of your entire application, there has been esri_slurp that let you download a version of the API from the CDN that was meant for testing purposes, but allowed users to create local custom builds of their applications.

 

The Bower package is a perfect drop-in tool you can use to create local builds.

 

I go in to a lot more detail in this blog post and video about how to use the Bower package to create your custom builds.

 

You can simply do:

 

bower --save arcgis-js-api

 

You can find more detailed samples in the guide. These samples demonstrate how to use the Bower package to install directly into your working directory, set up your development environment and do a local build of your application in both Dojo and RequireJS.

 

In many cases, you may not need to create a custom build of the application using the Bower package. If you're development has been working fine using the CDN, there is probably no need for you to use the Bower package. The JavaScript Optimizer makes it pretty easy to create custom builds of the ArcGIS JS API and even to get that specific build hosted in a CDN. If however, your applications need to sit inside a sandboxed environment where you can't use a CDN or maybe your applications are quite extensive and could benefit from a custom build, then the Bower package may be for you.

 

Whatever you decide, you are still building awesome apps!

 

For more geodev tips and tricks, check out my blog.

Outcomes