clasp-boilerplate
Develop Apps Script projects based using clasp with this boilerplate
AI Summary
clasp-boilerplate
Provides a starter template for developing and deploying Google Apps Script projects locally with clasp.
Target Users
Intermediate developers who want to manage and develop GAS projects locally with clasp and version control.
Problems Solved
Eliminates the complexity and manual setup required to configure clasp and a build environment when developing GAS locally.
Tags
Main Features
Pre-configured clasp setup
Includes ready-to-use `.clasp.json` and script ID configuration so you can immediately push/pull code.
TypeScript / ES6 build setup
Ships with tsconfig and build scripts enabling you to write modern TypeScript/ES6 code and deploy the transpiled output.
Organised folder structure & sample code
Comes with a `src` directory and sample functions, making it easy to extend your project.
Usage Examples
Deploying a Hello World
/**
* Sample function included in the clasp-boilerplate.
* After deployment, it logs a message to the executions log.
*/
function helloWorld() {
// Output a string to the Logger console
Logger.log('Hello from clasp-boilerplate!');
}
Place this code in src/Code.gs
(or equivalent), then deploy with:
# Push local changes to the Apps Script project
clasp push
# Open the project in the browser to test
clasp open