This repository aims at defining how one or more Google Apps Script (GAS) projects can be organized while satisfying the goals below.
- Modern javascript features (Typescript)
- Optional static and infered typing (Typescript)
- Code isolation and reuse (by using Typescript
namespacestatements and project references) - Incremental builds (Typescript 3.4)
- Fine control on how source
*.tsfiles get compiled into target*.jsfiles (i.e. overcome thets2gaslibrary limitations) - Code pretty printing and linting (Prettier and Tslint)
- clone this repository:
git clone https://github.com/PopGoesTheWza/ts-gas-project-starter.git - install (globally) the Clasp CLI:
npm install --global @google/clasp - install local dependencies:
npm install
Several commands are available as NPM scripts: npm run <command>. The most commonly used are:
buildandbuild-cleanto compile all projectsformatandlintto normalise code and check its correctenesspush-all,push-project1andpush-project2to publish the GAS projects