Arcade and amd js in external file

366
2
11-07-2023 03:04 PM
LefterisKoumis
Occasional Contributor III

For the purpose of keeping the code clean and organized, it is better to have the code and styles in external files linked to the main file instead of have them scripted in the same file. Is it easy to use an external file for the stylesheets. However, the question here is how can we linked to external files that contain arcade and amd js. 

For example this one:

https://developers.arcgis.com/javascript/latest/sample-code/sandbox/?sample=widgets-featureform-asyn... 

How do we link to the arcade and the rest of the js to an external file (s)?

There is a response to a similar question here, but I don't use typescript. 

It would be very helpful if the above example was reconstructed to demo the use of external files. 

THank you.

@HeatherGonzago @AnneFitz @KristianEkenes 

0 Kudos
2 Replies
HeatherGonzago
Esri Contributor

@LefterisKoumis I agree that it would be easier to read if broken out to a separate file. I plan on updating that sample to reflect the use of `editableExpression` as opposed to `editable` and will see if this is doable at that time. Thanks for the suggestion as I'm sure you are not the only one that is interested in seeing how this can work.

 

- Heather

0 Kudos
LefterisKoumis
Occasional Contributor III

ok. Thanks. The app that I am currently working on will have thousands lines of code (arcade + amd js) and it will be very hard to maintain without the use of external files.

0 Kudos