Continued adventures with VSCode. Automatic local file sync with Deployed(Reloaded) extension.

Skip to first unread message

Dimu Designs

May 21, 2019, 1:11:38 PM5/21/19
to Google Apps Script Community
I've been on a VSCode Extension binge of late, finding all sorts of solutions to problems that have plagued me for a while.

My most recent find helped me to resolve a longstanding issue with libraries and duplicate code.

I've had projects setup where I have multiple Apps Script projects bound to the same GCP project and they share common code. When using the standard Apps Script GUI, conventional wisdom dictates that I pull that common code into its own project and deploy it as a library. 

But, I was never comfortable with using libraries.The Apps Script documentation states that libraries can negatively impact performance, though some developers in our community have shown that impact to be minimal. 

Still, I've always opted to store 'library' code directly in the Apps Script project that uses it (primarily to minimize 'context-switching' and other maladies), but with multiple projects I have the burden of maintaining duplicate sets of code. 

That's less than ideal in terms of workflow.

Fortunately, I've come across a VSCode extension where I can link files across projects so that changes to one copy of a file updates another (or multiple other duplicates).

That extension is Deploy(Reloaded) and so far its proven to be useful.

Once the extension is installed, all I need to do is add configuration options (to settings.json) to define source and target files and it syncs them automatically (two-way sync requires additional definitions to sync from target to source).

Admittedly, Its not the most elegant solution, but it serves my purposes well enough.

I'd love to hear of other extensions that have proven useful for Apps Script development in VSCode. So please share.

Reply all
Reply to author
0 new messages