How do I clean up my global space without having to create +1000 lines .gs
files
- Here follows two photos of some of my files/folders. Mind how low the scroll bar can slide (30+ GAS files) ↓
- In Apps Script,
.gs
files cannot be manually mixed like.js
modules, which means I cannotimport
orexport
(right?), neither control what will be shown when you search for completions; - If I wrap it around an interface, I usually end up with +1000 lines of cod开发者_Python百科e, which made the whole project difficult to read;
function groupOfFunctions() {
this.doThis = function() { /* hundreds of lines */ };
this.doThat = function() { /* hundreds of lines */ };
// ...
this.subFunc_N = function() { /* hundreds of lines */ };
return this; // <-- makes tired face after this
};
- To avoid that, the project's been organized in a way all Functions rest on the global space;
- New problem: eventually, my global space has gotten heavily poluted with tons of Functions;
- The scenario is: I usually forget what Functions do, or even that they exist (so many times I coded something that was ready, but lost a
- I've found no Youtube videos, questions in forums or anything like it anywhere on the internet that talks about how to deal with it, so the question is:
How do I clean up my global space without having to create +1000 lines .gs
files
Articles, blogs, videos etc. are welcome.
精彩评论