Everything to get you quickly up and running with modern tooling that supports imports and exports right inside of your Google Spreadsheet scripts (Google Apps Script).
All of below technologies preconfigured to work with Google Apps Script:
- TypeScript
- rollup (for imports and exports)
- axios as a standardized fetch library (instead of the Google proprietary fetch)
- jest
- clasp
- some example code
- Clone the repo.
- Run
yarn
- Authenticate with your Google Account:
yarn google:login
- Ensure your Google account allows API access, by switching it on
- Create the linked Spreadsheet in your account:
yarn google:create --title "My new Spreadsheet"
- Move the
build/.clasp.json
file to the project directory (e.g. by runningmv build/.clasp.json .clasp.json
) - Publish the code after making changes using:
yarn google:publish
- Follow Google's developer
reference
and their guides,
but remember to
export
the functions inindex.ts
to expose them. - Remember to set relevant
oauthScopes
inbuild/appsscript.json