Bower install

1254
1
Jump to solution
05-23-2016 01:26 PM
JamesFaron
Occasional Contributor

Can someone tell me the purpose of having a built.html along with an index.html in the src folder? One file has the dojoConfig set up (index.html) but it is the built.html that is configured in gruntfile.js to be copied to the dist folder. I don't find any documentation on this in the instructions or files.

Thanks!

Jim Faron

0 Kudos
1 Solution

Accepted Solutions
ReneRubalcava
Frequent Contributor

The built.html has the dojoConfig omitted because it is embedded in the built file for you.

jsapi-resources/build.profile.js at master · Esri/jsapi-resources · GitHub

The built.html is copied to the build directory as index.html so the built app will run correctly.

This is only for demonstration purposes.

In a production environment, you should use some tooling to modify the HTML file.

You can look at this sample here using Grunt that will modify the HTML file during the build process.

esrijs-generator-demo/index.html at master · odoe/esrijs-generator-demo · GitHub

This is using a tool called grunt-processhtml.

I just didn't think it was worth piling on too much tooling for the demo app in the jsapi-resources repo

View solution in original post

1 Reply
ReneRubalcava
Frequent Contributor

The built.html has the dojoConfig omitted because it is embedded in the built file for you.

jsapi-resources/build.profile.js at master · Esri/jsapi-resources · GitHub

The built.html is copied to the build directory as index.html so the built app will run correctly.

This is only for demonstration purposes.

In a production environment, you should use some tooling to modify the HTML file.

You can look at this sample here using Grunt that will modify the HTML file during the build process.

esrijs-generator-demo/index.html at master · odoe/esrijs-generator-demo · GitHub

This is using a tool called grunt-processhtml.

I just didn't think it was worth piling on too much tooling for the demo app in the jsapi-resources repo