How to organize common code in Google App Script project? - google-apps-script

I'm newbie of google apps script programming and i would like to organize some common functions across several projects in a separated file, and reference them; I'm expert of C-languege project and in these environment I can make simply a library.
I will appreciate any kind of help.
Thanks in advance!
mike

You can consider writing a library with the common function and a library can be easily included in your other projects.

Related

Is there any way to collaborate on Remix IDE?

I am trying to look for a way in which multiple people can work on the same code collaboratively on the online Remix IDE. Currently, I have no option but to copy the updated code from Github manually and then paste it on Remix. Is there maybe some plugin or inbuilt functionality that allows collaboration? If not, what is the next best alternative?
Nope. You should use GitHub, GitLab, or some tool of that sort to keep the codebase and then manage that codebase in your IDE of choice (in your case, Remix).

Turning a Google apps script library into ... an extension?

I've got a GA script library, which contains some Google Docs operations that I use a lot (such as specific formatting, heading numbers or specific searches). When I want to use these functions, I currently add a script to the document, that loads the menu builder (in the library), and then add the library to that script. That seems to be the shortest way of using the library across multiple files. I have these questions:
(1) Is there a way in which these library functions can be available to all my Google Docs, without having to load them per document? My understanding is that this is not possible.
(2) Is this correct: The best way to make these library functions available would be to build an extension, and publish this on the Chrome store. (Possibly as 'beta extension'?)
If this is correct, then could somebody point me to a simple step-by-step guide for turning scripts into docs extensions? I've looked around, but what I saw wasn't all that clear. Ideally I'd like to be able to update the extension frequently, as it's still under development.
Thanks!

How to create a Google Cloud Launcher package?

Google Cloud has the click-to-deploy "Cloud Launcher" that makes it easy to deploy software packages on VMs. My company is interested in creating one of these click-to-deploy packages.
What is the process to create one of these packages? Is this sort of thing open to any developer? And how could I get in contact with the right people for this sort of thing?
Thanks in advance, I really appreciate it!
You can't create such packages yourself. Please get in touch with Google via this form to discuss your proposal.

Migrating script from Spreadsheet to Site

I've got a few scripts in various spreadsheets I'd like to 'migrate' to a site page.
I know I'll need to do some re-work, but I'd like to know if there's method besides 'Copy/Paste'.
Anyone have any 'best practices' to share?
Not really, copy 'n paste was the only way to go, and is still probably the solution for you. But there's some shiny new features, like having a standalone script or sharing it as a library that might suit you better.
Take a look at the recent release notes and blog posts.

When/how do I write Apps scripts in Dart

Is it possible to create apps script using Dart and the Dart->JS translator?
I'm guessing the answer is no, but I'd be interested in learning of any plans to integrate the two development environments.
You guessed right, the answer is no indeed. You can't write Apps Scripts in Dart.
Although your second question can only be answered by a Googler, but as a Top Contributor, I can say that if such plans exist they're probably not for the near future. I'd guess that it will not be here within a year.
Google Apps Script have a very specific set of libraries and usage that I imagine not to be Dart's team goal. I think such integration does not have much "appeal" for either teams (Apps Script and Dart).
A Googler has shown in DartConf 2018 lightning talk for using Dart in App Script. He promised it will be open sourced. The demonstrated solution includes App Script library in Dart, automated build and deployment through Google Drive.