You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not particularly proud of this solution as it requires manual
intervention to run tests.
Still searching for a way to very simply bundle the entrypoint functions
such that they are the only ones detected by GAS. The bundlers I've
tried thus far (esbuild, rollup) add too much boilerplate and expose
additional functions that GAS shouldn't care about.
This works for now, but I'll continue looking for a tool suited for the
above (perhaps creating my own if necessary).
These are just some basic automated tasks created using [Google Apps Script](https://www.google.com/script/start/). They are described below.
5
+
These are just some basic automated tasks created using [Google Apps Script (GAS)](https://www.google.com/script/start/). They are described below.
6
6
7
-
## Delete Old Labels
7
+
## Functions
8
+
9
+
### Delete Old Labels
8
10
9
11
I use labels to hang on to emails that I could need again in the immediate future. After months, however, I usually don't still need them. This function deletes emails by label older than a certain threshold (for my use case: 90 days).
10
12
11
-
## Mark Deleted As Read
13
+
###Mark Deleted As Read
12
14
13
15
Sometimes I delete emails without opening them (you know the type). I run this function periodically to mark all unread deleted emails as read.
16
+
17
+
## Building
18
+
19
+
Run `npm run build`. 'Course, all this does right now is copy `main.js` and `appsscript.json` into the `dist/` folder. Haven't yet figured out a satisfactory way to bundle the source code for GAS, but am open to suggestions.
20
+
21
+
## Testing
22
+
23
+
Run `npm test`. Note that you will need to uncomment the export at the end of `main.js` for the tests to run properly.
0 commit comments