<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic AMD - Dojo Build in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amd-dojo-build/m-p/714949#M66426</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to put together a build of a simple application that uses AMD modules.&amp;nbsp; The Dojo build documentation states that I need a copy of the Dojo SDK source, but I'm concerned that the merged Dojo / ESRI javascript libraries might conflict with another full copy of Dojo in my source files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone created a build release of their javascript apps using the Dojo build process (or r.js process using the latest javascript api)?&amp;nbsp; If so, can you share any lessons learned?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DB&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Aug 2012 22:15:19 GMT</pubDate>
    <dc:creator>DanielBradshaw</dc:creator>
    <dc:date>2012-08-29T22:15:19Z</dc:date>
    <item>
      <title>AMD - Dojo Build</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amd-dojo-build/m-p/714949#M66426</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm trying to put together a build of a simple application that uses AMD modules.&amp;nbsp; The Dojo build documentation states that I need a copy of the Dojo SDK source, but I'm concerned that the merged Dojo / ESRI javascript libraries might conflict with another full copy of Dojo in my source files.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Has anyone created a build release of their javascript apps using the Dojo build process (or r.js process using the latest javascript api)?&amp;nbsp; If so, can you share any lessons learned?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DB&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Aug 2012 22:15:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amd-dojo-build/m-p/714949#M66426</guid>
      <dc:creator>DanielBradshaw</dc:creator>
      <dc:date>2012-08-29T22:15:19Z</dc:date>
    </item>
    <item>
      <title>Re: AMD - Dojo Build</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amd-dojo-build/m-p/714950#M66427</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm no help on the dojo build. I tried getting it set up, but after a few tries I just went back r.js.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;With a fold structure like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
release/
src/
- index.html
- js/
- stylesheets/
- templates/
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a documented app.build.js file looks like this.&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;

/**
 * This is the build file I have started using
 * to build my ArcGIS JS API 3.0 apps, which are
 * based on Dojo 1.7. I used a similar build file
 * when I was using Require.js, so it wasn't much different.
 *
 * I tried using the Dojo Build Tools, but it just seemed
 * way too bloated to download the Dojo SDK, sort my files,
 * blah blah blah. With r.js I can use Node NPM to
 * npm install requirejs and just use the following command
 * r.js -o src/js/app.build.js
 * Done and done!
 *
 * This build file is meant to be used with r.js
 * http://requirejs.org/docs/optimization.html
 *
 * For more details on options, you can review
 * the sample r.js build file
 * https://github.com/jrburke/r.js/blob/master/build/example.build.js
 */
({
&amp;nbsp; appDir&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : "../",
&amp;nbsp; baseUrl&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : "js",
&amp;nbsp; dir&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : "../../release",

&amp;nbsp; paths&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : {
&amp;nbsp;&amp;nbsp;&amp;nbsp; "jquery"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 'libs/jquery/jquery-1.7.2.min',
&amp;nbsp;&amp;nbsp;&amp;nbsp; "jqueryui"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 'libs/jqueryui/jquery-ui-1.8.20.custom.min',
&amp;nbsp;&amp;nbsp;&amp;nbsp; "jquery.boostrap" : 'libs/boostrap/bootstrap.min',
&amp;nbsp;&amp;nbsp;&amp;nbsp; "underscore"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 'libs/lodash/lodash.min',
&amp;nbsp;&amp;nbsp;&amp;nbsp; "backbone"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : 'libs/backbone/backbone-min',
&amp;nbsp;&amp;nbsp;&amp;nbsp; /**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * This is key. Since the namespaces of dojo &amp;amp; esri,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * even dojox and dijit come from the ArcGIS CDN, use the
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * empty: scheme so r.js doesn't try pull in these
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * dependencies.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * http://requirejs.org/docs/optimization.html#empty
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */
&amp;nbsp;&amp;nbsp;&amp;nbsp; "dojo" : "empty: ",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "esri" : "empty: ",
&amp;nbsp;&amp;nbsp;&amp;nbsp; "text" : "empty:"
&amp;nbsp; },
&amp;nbsp; /**
&amp;nbsp;&amp;nbsp; * r.js uses uglifyjs by default.
&amp;nbsp;&amp;nbsp; * https://github.com/mishoo/UglifyJS/
&amp;nbsp;&amp;nbsp; *
&amp;nbsp;&amp;nbsp; * If you run r.js via java, you can use google closure.
&amp;nbsp;&amp;nbsp; * I tried to integrate closure, but java on my work
&amp;nbsp;&amp;nbsp; * machine kept punching me in the face. Stick with uglify,
&amp;nbsp;&amp;nbsp; * a dude on twitter told me it was faster anyway.
&amp;nbsp;&amp;nbsp; */
&amp;nbsp; optimize : "uglify",
&amp;nbsp; /**
&amp;nbsp;&amp;nbsp; * This doesn't work as intended for me.
&amp;nbsp;&amp;nbsp; * According to docs and google groups, this
&amp;nbsp;&amp;nbsp; * should remove all combined files when
&amp;nbsp;&amp;nbsp; * optimizing a whole project
&amp;nbsp;&amp;nbsp; */
&amp;nbsp; //removeCombined&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : true,
&amp;nbsp; /**
&amp;nbsp;&amp;nbsp; * This option will grab all the text! calls and
&amp;nbsp;&amp;nbsp; * place them in your optimized file to avoid
&amp;nbsp;&amp;nbsp; * making XMLHttpRequests to load the files
&amp;nbsp;&amp;nbsp; */
&amp;nbsp; inlineText&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : true,

&amp;nbsp; /**
&amp;nbsp;&amp;nbsp; * This is optional, as setting the modules
&amp;nbsp;&amp;nbsp; * will create a combined file of all dependencies
&amp;nbsp;&amp;nbsp; * in the release folder. You get a single larger file
&amp;nbsp;&amp;nbsp; * to load rather than multiple smaller files.
&amp;nbsp;&amp;nbsp; * Use at your own discretion.
&amp;nbsp;&amp;nbsp; * */
&amp;nbsp; modules&amp;nbsp; : [
&amp;nbsp;&amp;nbsp;&amp;nbsp; {
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /**
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * I optimze my app file, because I use
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * my main file to set up my dojoConfig.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * If doing a single js file optimization,
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * DO NOT include the dojoConfig file
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * to be included. It will blow you up.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Optmize the next entry point into your app.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; name: "app"
&amp;nbsp;&amp;nbsp;&amp;nbsp; }
&amp;nbsp; ],

&amp;nbsp; /**
&amp;nbsp;&amp;nbsp; * Will make your css a single line file
&amp;nbsp;&amp;nbsp; */
// I had an issue in one app where this caused some issues. Didn't track it down, but only
// happened in the one app. I should look into it further. Just disable if it causes problems.
&amp;nbsp; optimizeCss&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; : "standard",
&amp;nbsp; /**
&amp;nbsp;&amp;nbsp; * Ewww, RegEx. It's easy though,
&amp;nbsp;&amp;nbsp; * just include files/folders you don't want to
&amp;nbsp;&amp;nbsp; * get exported to your release build folder.
&amp;nbsp;&amp;nbsp; */
&amp;nbsp; fileExclusionRegExp : /\.(coffee|coffee~|js~|html~|css~|swp|rb|lnk)|sass|.sass-cache|build/
})
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 06:36:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amd-dojo-build/m-p/714950#M66427</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2021-12-12T06:36:48Z</dc:date>
    </item>
    <item>
      <title>Re: AMD - Dojo Build</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amd-dojo-build/m-p/714951#M66428</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Odoe -&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the follow-up.&amp;nbsp; I'm glad to know that I can still use the require optimizer (easier to use).&amp;nbsp; And thanks for the inspiration!&amp;nbsp; I've already been using your github apps as a gut-check for the some of the work I've been doing.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anybody else out there use the Dojo build process with the latest javascript API?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;DB&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2012 00:46:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/amd-dojo-build/m-p/714951#M66428</guid>
      <dc:creator>DanielBradshaw</dc:creator>
      <dc:date>2012-08-30T00:46:19Z</dc:date>
    </item>
  </channel>
</rss>

