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

Can no longer 'download' files #19

Closed JCarran0 closed 8 years ago

JCarran0 commented 8 years ago

It seems like you've removed the ability to pull files down from the Apps Script project to a local directory. You used to have a download terminal command, which is no longer working for me. Is this still possible?

danthareja commented 8 years ago

Yes! This was removed because it conflicts with some new ideas of the project. The current version is designed to facilitate local development from the beginning of a new Apps Script project. By starting with gapps init, your local directory is now the source of truth for your project. This makes version control easy because you can push the same directory to the Apps Script servers as well as your remote git repo without having to worry about conflicts.

I understand this leaves out the entire use case of having an existing project on the Apps Script servers that you may want to download. Getting the project down is easy enough, but it beings to conflict with the "local is master" idea described above.

I can see two options:

The quick fix: npm i -g node-google-apps-script@0.1.5 will give you the last version with the download command The long fix: Bring back a download feature. I'm not entirely sure what this would look like right now, but am very open to developing it. To help this along, might I ask what your intended use once you've downloaded the files is?

danthareja commented 8 years ago

After looking into it a bit more, it would be pretty easy to download the current state of the project during the gapps init stage.

Would this solution work for you @JCarran0?

danthareja commented 8 years ago

Just pushed v1.1.0 that addresses this. Now when you run gapps init <fileId>, any files currently existing in the project will be downloaded to the subdirectory created by init.

JCarran0 commented 8 years ago

@danthareja Yes, this would meet my needs! I'm interested in getting many existing projects up on GitHub and this would enable that. Awesome tool! Thanks!

danthareja commented 8 years ago

Glad to hear it! Let me know if you have any problems with the new init flow :)