You have two options:
- Publish your scripts as libraries and subscribe to each in each other of your script projects.
- Publish your scripts as web apps with specific functions as individual pseudo webhooks. Sort of like a distributed API.
There are pros and cons of each. Neither is about maintainability really.
The library option will afford code completion whereas the web app option will enable (if you wish) for you to run code asynchronously.
Both have different speed penalties. Library enabled scripts are slower as described in the documentation. Web apps will be slower because of urlfetch
latency.
Library functions will use the runtime allowed for them in the host script, whereas web apps will extend runtime and some quotas.
Documentation:
- Publish your scripts as a library
- Running apps script as an endpoint
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…