Sublime Forum

How to create files on installation?

#1

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.

0 Likes

#2

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