{"id":15413210,"url":"https://github.com/tomwayson/esri-slurp-example","last_synced_at":"2026-03-04T14:02:18.023Z","repository":{"id":20524761,"uuid":"23803790","full_name":"tomwayson/esri-slurp-example","owner":"tomwayson","description":"Example of how to do a Dojo build with Esri JSAPI source code downloaded using grunt-esri-slurp","archived":false,"fork":false,"pushed_at":"2015-12-02T00:08:12.000Z","size":36,"stargazers_count":13,"open_issues_count":0,"forks_count":4,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-10-10T06:13:46.490Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomwayson.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-09-08T18:54:58.000Z","updated_at":"2021-01-19T06:52:12.000Z","dependencies_parsed_at":"2022-09-07T10:52:06.485Z","dependency_job_id":null,"html_url":"https://github.com/tomwayson/esri-slurp-example","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/tomwayson/esri-slurp-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomwayson%2Fesri-slurp-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomwayson%2Fesri-slurp-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomwayson%2Fesri-slurp-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomwayson%2Fesri-slurp-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomwayson","download_url":"https://codeload.github.com/tomwayson/esri-slurp-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomwayson%2Fesri-slurp-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30083004,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-04T13:22:36.021Z","status":"ssl_error","status_checked_at":"2026-03-04T13:20:45.750Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T16:56:02.139Z","updated_at":"2026-03-04T14:02:17.994Z","avatar_url":"https://github.com/tomwayson.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"#esri-slurp-example\n\n**DEPRECATED** Use the [bower build of the ArcGIS API for JavaScript](https://developers.arcgis.com/javascript/jshelp/inside_bower_custom_builds.html) instead.\n\nThe purpose of this repo is to show how to do a Dojo build with Esri JSAPI source code downloaded using [grunt-esri-slurp](https://www.npmjs.org/package/grunt-esri-slurp). The build profile and grunt configuration draw heavily from the [AGRC JavaScript Project Boilerplate](https://github.com/agrc/AGRCJavaScriptProjectBoilerPlate), which is itself based on the [Dojo Boilerplate](https://github.com/csnover/dojo-boilerplate). However, the configurations in this repo are pared down to demonstrate only what is necessary to create a custom Dojo build of a simple \"app\" featuring an Esri map (based on the [Create a map sample page](https://developers.arcgis.com/javascript/jssamples/map_simple.html)).\n\n##Instructions\nYou must have [Node.js](http://nodejs.org/) installed as well as the [Grunt CLI](http://gruntjs.com/getting-started) prior to running the steps below.\n\nInstall Grunt tasks with npm:\n```bash\nnpm install\n```\n\nDownload Dojo and other dependencies with bower:\n```bash\nbower install\n```\n\nDownload the AMD build of the ArcGIS API for JavaScript with [grunt-esri-slurp](https://www.npmjs.org/package/grunt-esri-slurp):\n```bash\ngrunt slurp\n```\n\nTo verify that all dependencies are in place, you can serve the unbuilt app with:\n```bash\ngrunt connect:src\n```\nThen browse to `http://localhost:9000/` and verify that it works.\n\nFinally, build the app:\n```bash\ngrunt build\n```\n\nTo verify that the build was successful, you can serve the built app with:\n```bash\ngrunt connect:dist\n```\nThen browse to `http://localhost:9000/` and verify that it\n works. You can inspect the network traffic to verify that the build version of the app requests fewer and smaller scripts (see below).\n\n##Comparing the Built App\nIn order to determine if our build improves the user experience, we need to verify that the built page makes fewer script requests and that the size of the scripts requested is smaller when compared to similar pages that reference the [standard and compact CDN hosted builds of the API](https://developers.arcgis.com/javascript/jshelp/inside_compactbuild.html). The \"app\" in this example is based on the [Search multiple sources sample page](https://developers.arcgis.com/javascript/jssamples/search_multiplesources.html), and for convenience, this repo includes a copy of that page as well as a copy that uses the compact build (under the `samples` folder). I've compiled a comparison of the file requests and sizes between the different builds below.\n\nPage | JS Requests | JS KB (gzipped) | JS KB (uncompressed)\n------ | ----------------- | ------------- | --------------- | ---------------\ndist/index.html (built app) | 1 | 304 | 792\nsamples/search_multiplesources_compact.html | 23 | 348 | 850\nsamples/search_multiplesources.html | 7 | 431 | 1091\n\nHowever, **your mileage may vary and there are many factors to consider when deciding whether or not it is worth while to do a Dojo build.** If your code is small and/or does not reference a lot of modules that are not already included in one of the CDN builds, a local build may not help that much. Conversely, when creating applications with many modules, you should see significant improvements over the CDN builds in most cases.\n\n## Reducing the Size (on Disk) of Build Output\nBy default the Dojo build outputs uncompressed versions of the source files as well as source maps to aid in debugging. If you don't need the source maps or uncompressed files (e.g. if you debug using the unbuilt source), then you can save time and space while running the build by uncommenting the following line in app.profile.js:\n```js\n// useSourceMaps: false\n```\n\nYou can further reduce the size of the output directory by 50% or more by running the following grunt commands *after* the build:\n```bash\ngrunt clean:uncompressed\ngrunt clean:stripped\n```\n\n##Resources\n- [grunt-esri-slurp](https://www.npmjs.org/package/grunt-esri-slurp)\n- [AGRC JavaScript Project Boilerplate](https://github.com/agrc/AGRCJavaScriptProjectBoilerPlate)\n- [Dojo Boilerplate](https://github.com/csnover/dojo-boilerplate)\n- [Dojo Build Tutorial](http://dojotoolkit.org/documentation/tutorials/1.9/build/)\n- [Dojo Build Reference Guide](http://dojotoolkit.org/reference-guide/1.9/build/index.html)\n- [ArcGIS API for JavaScript Compact Build](https://developers.arcgis.com/javascript/jshelp/inside_compactbuild.html)\n\n##Credit\nThere's nothging new here. The hard work has already been done by the estimable [@steveoh](https://github.com/steveoh) and [@stdavis](https://github.com/stdavis). This is just an attempt to make the great work that they've already done a bit more approachable (even though [they mock me](https://github.com/tomwayson/esri-slurp-example/issues/2#issuecomment-55122452)).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomwayson%2Fesri-slurp-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomwayson%2Fesri-slurp-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomwayson%2Fesri-slurp-example/lists"}