Gmail Addon Boilerplate

screenshot of Gmail Addon Boilerplate

A TypeScript-based Gmail add-on Boilerplate

Overview

The Gmail Add-on Boilerplate is an excellent starting point for developers looking to create their own Gmail add-ons using the Google Apps Script platform. With its clear structure and well-defined processes for installation, development, and deployment, it's designed to streamline the creation of add-ons that can enhance the Gmail experience for users.

By leveraging TypeScript alongside a straightforward manifest file, this boilerplate ensures that developers can focus on functionality while minimizing the complexity often associated with building add-ons. Whether you're a seasoned developer or just starting, this boilerplate can be a valuable tool in your arsenal.

Features

  • Easy Installation: The setup instructions are straightforward, requiring only a simple change in the package name within the package.json file to get started.

  • TypeScript Support: This boilerplate includes a src/ directory with TypeScript files, allowing for modern JavaScript development features while ensuring type safety.

  • Manifest Management: It includes a clear structure for the appsscript.json manifest file, essential for configuring the add-on’s behavior and permissions.

  • Export Callback Functions: Helps prevent build failures by ensuring that functions expected to be called by Google Apps Script are properly exported in the source code.

  • Prevent Naming Conflicts: The documentation warns against reusing function names across different files, helping developers avoid issues during the build phase when files are consolidated into a single addon.js.

  • Seamless Deployment: This boilerplate utilizes the google-apps-script CLI, streamlining the process of syncing code changes to an existing project or creating a new one.

  • Live Error Monitoring: A built-in watch command enables developers to monitor their code for errors in real-time during the development phase.

  • Easy Add-on Activation: Once the add-on is developed, it can be installed directly through Gmail settings, making it easy to test and deploy your work.

rollup
Rollup

RollupJS is a popular and efficient JavaScript module bundler that takes the code from multiple modules and packages them into a single optimized file, minimizing the overall size of the application and improving its performance.

typescript
Typescript

TypeScript is a superset of JavaScript, providing optional static typing, classes, interfaces, and other features that help developers write more maintainable and scalable code. TypeScript's static typing system can catch errors at compile-time, making it easier to build and maintain large applications.