I'm trying to make a simple plugin that gets triggered every time I save a document (that way I can get rid of some dodgy fswatch command I have currently running to detect the very same thing).
The docs for this hook are lagging a bit behind (http://developer.sketchapp.com/reference/action/DocumentSaved/) so I'd love if you could point me to any plugin currently using DocumentSaved so I can learn how it works.
See Ale's Actions API instructions - simply replace OpenDocument in his example with DocumentSaved, and the name of the function you want to run
As a practical example, I use DocumentSaved here to call a function in our internal framework
oh and if it helps, the context.actionContext has the following format
autosaved = 0;
document = "<MSDocument: 0x7ff800e3f4f0>";
size = 3093233;
So many thanks @robin Now everything makes sense