I would like to have the option to use remote scripts.
The reason for this is that we have a lot of different templates that all share similar code in one way or another. For example I have a global script that contains functions that are used within all the other scripts. From time to time I come across a document that I am building that needs an additional global function. As I would like to have certain scripts the same for all the document templates I now have to go through all the other templates and copy + paste this code across all of them to keep them all the same.
For a few templates this is annoying but doable. When you have 60+ templates this becomes a very irritating task.
Also it would be great to have this to keep the templates even smaller (of course this will have an impact when loading the template as it will need to load in all the external resource).
As there are already a lot of possibilities to add remote files. E.g.:
- Resources: Stylesheets, Java Scripts, Images, Snippets, Translations, etc.
- Within scripts: you can use loadHTML or loadJSON to load snippets
Almost the only thing that does not have a remote option are the scripts itself.
We tried placing all the document templates within a single template so we can share the code among all the templates but after a while there are serious performance issues.
And of course this also brings other downsides like hard to manage changes as one change for a document can have a major impact for another document.