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

Expose gaps commands as library #4

Closed cwarden closed 9 years ago

cwarden commented 9 years ago

Expose init, download, and upload functions so gaps can be used in other javascript programs.

Update clone and download functions to take an optional destination directory. Update download function to return the project object so the path to the actual project, based on the project's name, can be retrieved.

Update upload function to take an optional source directory. When uploading, set path in the manifest to the actual path in case the directory has been moved and the path inside the manifest file is no longer correct.

cwarden commented 9 years ago

If you have a preferred testing framework, I'd be happy to include tests for these changes.

danthareja commented 9 years ago

I love this @cwarden! Very nice use some underscore methods. _.constant(project) is just the pattern I was looking for.

Tests are certainly on the todo list. Would you mind firing up a few for your great work? I'm super happy to pull these changes in.

danthareja commented 9 years ago

Merged! I'll add tests eventually. Thanks for your contribution!

cwarden commented 9 years ago

@danthareja, sorry for not getting back to this to add the tests. I started working on the tests for the download module, but put it aside when the changes started getting rather intrusive since none of the internal functions are exposed. Here's where I left off: e1eac802380f05213b34d6ca9c8794dc665b3287