randy3k / AutomaticPackageReloader

Automatically reload submodules while developing a Sublime Text package.
MIT License
38 stars 13 forks source link

Removes is_enabled from PackageReloaderReloadCommand #33

Closed kylebebak closed 5 years ago

kylebebak commented 5 years ago

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.

randy3k commented 5 years ago

You are probably right. I will take a closer look tomorrow.

kylebebak commented 5 years ago

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.

randy3k commented 5 years ago

v1.3.7 is tagged

kylebebak commented 5 years ago

Right on =), thanks @randy3k