google-sheets-scripting-starter-pack
google-sheets-scripting-starter-pack copied to clipboard
A template repository for creating Google Sheets scripts utilizing full potential of JavaScript ecosystem
Google Sheets Scripting Starter Pack
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).
Features
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
quick start
- 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