brucemcpherson / desktopliberation

hosting for desktop liberation google plus community
30 stars 1 forks source link

Pull libraries inline to your Apps Script project #123

Open brucemcpherson opened 2 years ago

brucemcpherson commented 2 years ago

This piece of work was both challenging and a lot of fun to produce, and it’s something I’ve wanted to get round to for a long time. Apps Script libraries are a great way to reuse work you and others have done, but you have to be careful that they don’t get out of date. Libraries that refer to other libraries are complex to keep up to date, and worst of all they may disappear or their permissions change at any time.

Google recommend you don’t use them in Add-ons, and although they focus on ‘load efficiency’ (I did a study on this a few years back and found absolutely no evidence of a measurable load penalty for libraries: see Measuring library load speed ), the above are probably better reasons to bundle all the code you use in your app or Add-on.

This builds on the work from Import, export and mix container bound and standalone Apps Script projects and I release it as a library (which you can of course use to inline it to your own project if you want!).

Library references at the end of the article

https://ramblings.mcpher.com/apps-script/add-ons/inline-libraries/