Sublime Forum

How to create files on installation?


I’d like to use a database with my plug in. Is package manager executing some installation scripts so i can create a database once on installation? I.e., an event listener for on_post_install.



Package Control indeed has an event API that has an install event that triggers when a package is installed, a remove event so you can clean up if your package gets removed, and pre and post upgrade events as well.

The link to the documentation on this above also includes some sample code.

1 Like