Closed kylebebak closed 5 years ago
You are probably right. I will take a closer look tomorrow.
Thanks for looking at this so quickly!
I've used this wonderful package for my own package dev needs for years, and now I'm using it to reload the TypeScript package without having to restart Sublime Text.
The TypeScript package crashes quite frequently, but reloading it with AutomaticPackageReloader gets it running again immediately.
v1.3.7 is tagged
Right on =), thanks @randy3k
The two lines of code I deleted made it impossible to use the plugin from outside of a package, even though it was clearly designed to be used in this way... Just look at the
pkg_name
arg!Removing them makes it possible to call
package_reloader_reload
from outside of a package, to reload any package from any directory.In any case, the plugin already has code that prints an error message to the console if a user calls the plugin from a directory that's not a Sublime Text package:
print("Cannot detect package name.")
.I don't think this requires any updates to the docs, but I would be glad to add a section that explains how a user could create a key binding to reload a specific package.