Mastering Google Apps Script: A Professional TypeScript Workflow
mg3994
Mastering Google Apps Script: A Professional TypeScript Workflow
Building a robust backend on Google Apps Script requires moving beyond the built-in browser editor. For complex projects like the infrastructure powering Antinna, we need a modern development environment that enforces Clean Architecture and DRY principles.
In this comprehensive guide, we will set up a professional workflow using TypeScript for type safety, esbuild for lightning-fast bundling, and clasp for automated deployment.
📖 Quick Navigation 1. The Directory Structure 2. Project Metadata & Dependencies 3. TypeScript Configuration 4. Pre-build Cleanup 5. The Esbuild Engine 6. The Clasp Bridge 7. The Project Manifest 8. Execution Commands 1. The Directory Structure
A clean architecture begins with a clean file system. We strictly separate our source code ( src ) from the compiled output ( dist ). Note that the appsscript.json manifest must live in the dist folder.
Project Directory Tree Text Copy antinna-backend/
├── dist/ # Compiled output (pu…