google / clasp

🔗 Command Line Apps Script Projects
https://developers.google.com/apps-script/guides/clasp
Apache License 2.0
4.53k stars 422 forks source link

Add command to delete Apps Script projects #799

Open elderfd opened 4 years ago

elderfd commented 4 years ago

For testing + staging purposes we'd like to be able to spin up ephemeral Apps Script projects which exist only to test a PR. We can currently create the projects with clasp create but there is no matching clasp delete to clean up afterwards.

Expected Behavior

There is a clasp delete command to delete the Apps Script project with a particular ID (or read from .clasp.json).

Actual Behavior

N/A

Steps to Reproduce the Problem

N/A

Specifications

N/A

fantonangeli commented 2 years ago

I did a PR with a delete command reading the ids only from the .clasp.json only, because in the case of a parent is needed to delete the parent and not the appscript. So a command like: clasp delete APPSCRIPTID --parentId PARENTID will have to ignore the APPSCRIPTID, which I think looks 'strange', and without the PARENTID will not work.