hhkaos / awesome-arcgis

📄 Awesome resource list for ArcGIS Developers -> could you help us with a Star? ⭐
https://hhkaos.github.io/awesome-arcgis
GNU General Public License v3.0
111 stars 31 forks source link

Compile ArcGIS API for JS (3.XX or 4.X) #12

Closed sanmolhec closed 6 years ago

sanmolhec commented 6 years ago

Hi, where I work we have a few developments with ArcGIS API JS 3.XX and now we are working on a new API 4.X.

These are not pure HTML + JS developments, but solutions .NET (either ASP.NET or MVC) with JS client code using the ArcGIS APIs.

We are currently referencing API scripts to the ESRI CDN, but we have been wanting to compile sources and serve APIs from our servers for some time now, and refer projects to our url's.

In this way, if we have to personalize something, we would have it centralized, and if we have to make changes we would only do them once for all the projects.

We have found the following information:

But we don't even know where to start, because what counts is how to include the api in your solution, when what we need is to compile it once to serve it from our machines.

Is there information or could you provide it to us about how to do this?

If you simply mount one of these solutions and then extract the compiled API, which of these forms is the most appropriate?

Thanks a lot.

Greetings, Hector.

odoe commented 6 years ago

If I understand correctly, you want to do one build of the API and use that single build for all your apps?

If that's your scenario, I'd recommend just using either the CDN or the prebuilt download of the API, as a single build is really meant on a per-application basis. You would basically need to inject the Dojo build step into your current build workflows.

sanmolhec commented 6 years ago

You got it right, we do want to use a single version of the API for all applications (one for version 3 and another one for version 4).

We don't use the CDN because we want to customize it a little and serve it from our servers.

The default download of the API has already been downloaded, but it is very heavy and with multiple files. We thought we could use some of the compilers to create a unified and minified "custom API" in a single lighter file (one per API).

I guess what we'll have to do is what you say at the end, inject the Dojo build... But this you tell us we don't know what it is, is something different from the steps that are given in the documentation of the api?

Thank you very much and we're sorry for the inconvenience.

Regards, Hector.

odoe commented 6 years ago

The links you provided have the info on the Dojo builds. It's just using the Dojo tooling to do the actual builds. Follow the steps given there and you should be good.