/clasp-template

Starter structure for Google Apps Script clasp project

Primary LanguageTypeScript

Clasp Starter Template

Starter template for Google Apps Script projects using clasp.

Includes some helper functions for potential tasks.

Setup

1) Clone Repo

2) Init new project

# reset Git project
rm -rf .git
git init

# reset package.json
rm package.json package-lock.json
npm init -y

3) Install packages

# Make sure clasp & typescript are installed globally
npm install -g typescript
npm install -g @google/clasp

# install GAS types locally
npm i -S @types/google-apps-script

For linting:

npm i --save-dev prettier @trivago/prettier-plugin-sort-imports

4) Setup Clasp

  • clasp login
  • Update scriptId in .clasp.json with an existing google script