|
| 1 | +# Project Overview |
| 2 | + |
| 3 | +This is a starter kit for developing Google Apps Script projects with modern web development tools. It allows developers to use next-generation JavaScript (ES6+) and provides a local development environment with features like code bundling, linting, and testing. |
| 4 | + |
| 5 | +The project is designed to build Google Workspace add-ons for applications like Google Docs, Sheets, Gmail, and Slides, as well as web applications and workflow automation routines. |
| 6 | + |
| 7 | +## Main Technologies |
| 8 | + |
| 9 | +* **Google Apps Script:** The runtime environment for the code. |
| 10 | +* **JavaScript (ES6+):** The primary programming language. |
| 11 | +* **Node.js:** Used for managing dependencies and running build scripts. |
| 12 | +* **Vite:** A modern build tool that bundles the JavaScript and other assets for deployment. |
| 13 | +* **Jest:** A testing framework for writing and running unit tests. |
| 14 | +* **ESLint:** A linter to enforce code quality and style. |
| 15 | +* **Prettier:** A code formatter to maintain a consistent code style. |
| 16 | +* **clasp:** The official command-line tool for managing Google Apps Script projects. |
| 17 | + |
| 18 | +## Architecture |
| 19 | + |
| 20 | +The project is structured as follows: |
| 21 | + |
| 22 | +* `src/`: Contains the main source code for the application. |
| 23 | + * `index.js`: The main entry point for the application. |
| 24 | + * `html/`: Contains HTML files for the user interface. |
| 25 | + * `server/`: Contains server-side code. |
| 26 | +* `dist/`: Contains the bundled code that is deployed to Google Apps Script. |
| 27 | +* `functions/`: Contains custom functions for Google Sheets. |
| 28 | +* `appsscript.json`: The manifest file for the Google Apps Script project, which defines dependencies, OAuth scopes, and other settings. |
| 29 | +* `vite.config.js`: The configuration file for the Vite build tool. |
| 30 | +* `package.json`: Defines the project's dependencies and scripts. |
| 31 | + |
| 32 | +## Building and Running |
| 33 | + |
| 34 | +The following commands are used to build, test, and deploy the project: |
| 35 | + |
| 36 | +* **Install dependencies:** |
| 37 | + ```bash |
| 38 | + npm install |
| 39 | + ``` |
| 40 | +* **Build the project:** |
| 41 | + ```bash |
| 42 | + npm run build |
| 43 | + ``` |
| 44 | +* **Build for development and watch for changes:** |
| 45 | + ```bash |
| 46 | + npm run dev |
| 47 | + ``` |
| 48 | +* **Run tests:** |
| 49 | + ```bash |
| 50 | + npm run test |
| 51 | + ``` |
| 52 | +* **Deploy the project to Google Apps Script:** |
| 53 | + ```bash |
| 54 | + npm run deploy |
| 55 | + ``` |
| 56 | + |
| 57 | +## Development Conventions |
| 58 | + |
| 59 | +* **Coding Style:** The project uses Prettier for code formatting and ESLint for linting. The configuration for these tools can be found in `.prettierrc` and `eslint.config.js` respectively. |
| 60 | +* **Testing:** The project uses Jest for unit testing. Test files are located alongside the files they are testing and have a `.test.js` extension. |
| 61 | +* **Commits:** The project does not have a formal commit message convention, but it is recommended to follow standard practices for writing clear and descriptive commit messages. |
0 commit comments