danthareja / node-google-apps-script

[DEPRECATED - use clasp instead] The easiest way to develop Google Apps Script projects
MIT License
353 stars 70 forks source link

Review CLASP #86

Closed lricoy closed 6 years ago

lricoy commented 6 years ago

It appears that Google has been busy and will now offer the possibility to develop app scripts locally, see versions, automatically deploy, etc... They have launched it on January 11th without much noise.

We should review it and ideally put a notice on the README about it

https://developers.google.com/apps-script/guides/clasp https://github.com/google/clasp

lricoy commented 6 years ago

@danthareja @aurelienshz if you guys could also take a quick look it would be awesome :)

danthareja commented 6 years ago

Do either of you you see any reason for this project to co-exist with clasp?

lricoy commented 6 years ago

Not really. Since the other one is open source as well I think we should give it priority. I have not tried it yet though.

JeanRemiDelteil commented 6 years ago

Hello guys, here is my experience:

I've used gapps for some years now, to work with our addons projects. Then came this AppsScript API release and along with it the clasp CLI.

It basically does the same thing than gapps, though rely on the new GAS API, which does pretty much everything we ever wanted to do with GAS files (and container bound file).

They already have added all the basic stuff, fixed the more pressing issues. And it has some really nice feature like allowing to keep a coherent folder structure locally and keep this structure by renaming the gas files like : folder/file

I really thank the gapps project for all the time it saved through all these years though ! We have switched to clasp now as it gave us the opportunity to work with all our container bound script immediately.

danthareja commented 6 years ago

Thanks for sharing your experience, @JeanRemiDelteil.

Since the tool is officially supported by Google, I think we can safely deprecate this project.

I'll leave this issue open for another week to solicit other opinions. If there's no strong support to keep this project alive, I'll release a final version and post a deprecation notice on the README.

hess-g commented 6 years ago

It is hard to believe that I wrote this article over two years ago - https://developers.googleblog.com/2015/12/advanced- development-process-with-apps.html. In the following year, as I continued consulting with the Apps Script team, I got to be involved with some of the work that became the new Apps Script API, and wrote an early internal version of what is now clasp - a way more streamlined and elegant iteration than mine. It's exciting to see that vision come to light.

GAPPS has played an important role in this ecosystem in the intervening period, and was instrumental in keeping the conversation alive in terms of the value that real tooling + Apps Script capabilities would offer to this community.

Dan (et al), I hope our paths do cross IRL at some point in the future.

On Tue, Feb 27, 2018 at 1:50 PM, Dan Thareja notifications@github.com wrote:

Thanks for sharing your experience, @JeanRemiDelteil https://github.com/jeanremidelteil.

Since the tool is officially supported by Google, I think we can safely deprecate this project.

I'll leave this issue open for another week to solicit other opinions. If there's no strong support to keep this project alive, I'll release a final version and post a deprecation notice on the README.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/danthareja/node-google-apps-script/issues/86#issuecomment-368985089, or mute the thread https://github.com/notifications/unsubscribe-auth/AMPN9D-6hqWo-ot3PE0sPVMsVcfJoyBXks5tZE6MgaJpZM4STNPq .

aurelienshz commented 6 years ago

I finally had time to try out clasp. My opinion is that the way node-google-apps-script is designed is a little bit better, in the sense that it targets a directory instead of using the contents of the current directory. On the project I'm working on, we currently can't live without this, because we are using Gulp to perform a few build steps, and then upload the contents of the build result directory. The second element is the fact that individual commands of node-google-apps-script are exported individually, allowing to use them programmatically in our gulpfile instead of having to run an actual CLI command. This allows us to script our upload step instead of having a package.json script defined as gulp build && gapps upload (minor, but still looks a bit and easier to reason about).

There is, however one huge upside to CLASP: error messages. Here's an example of what happens when the upload fails because of a syntax error:

$ gapps upload
Pushing back up to Google Drive...
Uploading 2 files to Google
An error occured while running upload command: Bad Request
Upload failed.

versus:

$ clasp push
Push failed. Errors:
Syntax error: Syntax error. line: 5 file: Code

Where it currently stands is that we're going to try to get going a few PRs on clasp to make it more convenient for advanced use, but in the meantime, we'll stick to this project. If clasp maintainers want to stick to a simple tool without any configuration options, it will then make sense for node-gapps to continue to live alongside, but we might want to switch to the scripts API instead of the Drive API so that we benefit from the detailed error messages when the upload fails. Otherwise, we could safely deprecate this project and switch our efforts to helping on maintaining clasp.

For now, I would be in favor of adding a small warning on top of our README to explain that Google has released their official tool for the same use as this project, and that unless you need configurable target directory or programmatic use, newcomers might want to use the officially maintained tool instead of a community-maintained one.

jondcallahan commented 6 years ago

Great write up on the pros and cons, one note: you can specify a directory containing files to be uploaded with clasp using the rootDir option in the clasp config json file. Similar to you, my project has some build steps which outputs to a dist directory so I opened a PR on clasp to support that. It was merged in a few weeks ago.

aurelienshz commented 6 years ago

Thanks for the heads up! Guess I haven't been reviewing clasp thoroughly enough. It's definitely a viable option then.

grant commented 6 years ago

Hey all, I feel like this thread has many of the top Apps Script contributors. Thank you for contributing to the Apps Script ecosystem! ❤️ ⭐️

I pick up the reins of @hess-g's work and developed clasp at Google and am working on a better developer experience in general for Apps Script with G Suite add-on teams.

There's definitely a lot of ideas around creating a better developer experience in Apps Script. Like 2 way sync'ing, develop Apps Script locally with TypeScript, clasp run sendEmail, etc... There's some ideas written in the issues section of the repo.

If there's anything Google or I can do, I'd love to hear them. Please voice what you want to see in Apps Script, and we can bring these features to life.

danthareja commented 6 years ago

Given the discussion here, I'm now confident that the right move is to deprecate this project in favor of clasp.

Thank you @hess-g and @Shrugs for making this project what it was, @lricoy and @aurelienshz for supporting this project during it's final days, and @grant for offering to continue working with the community built around this project.

I'm glad the wheel of time is rotating strong this community.

oshliaer commented 6 years ago

It was great!