Esri / esri-wab-build

Package used to build ESRI Web App Builder Apps for production.
Apache License 2.0
17 stars 5 forks source link

Find api version from env.js #23

Closed g3r4n closed 7 years ago

g3r4n commented 7 years ago

fix #16

gbochenek commented 7 years ago

Very cool. Thanks for all the contributions.

gbochenek commented 7 years ago

I just realized (after merging) that this doesn't fully account for everything. There is a find replace at the end that removes the hardcoded env.js reference to the API. We'll have to adjust for the check for this to work across multiple environments.

g3r4n commented 7 years ago

Can you be more specific ? Can you give a scenario where it will not working ? If the find and replace occurred after we checked the apiversion that fine.

gbochenek commented 7 years ago

Sure. It happens in utilscripts.js. Look for REPLACE.

I'm thinking we add the jsapi version as a parameter to that function.

g3r4n commented 7 years ago

You totally right i will fix this one ! btw i think we have to clean a little bit the code because there is some dead code like : https://github.com/gbochenek/esri-wab-build/blob/cfa15ee4ee7fa516e195c335d6ee1ff5a5a143ab/app/utilscripts.js#L390 where portalUrl is not used and config.json is read for nothing

g3r4n commented 7 years ago

in env.js there is no string like '//apiUrl=[POINT_TO_ARCGIS_API_FOR_JAVASCRIPT];' it's from the arcgis-js-api i think. so the entire function is useless.