diff --git a/lib/beautify.coffee b/lib/beautify.coffee index 8173903..d00aa43 100644 --- a/lib/beautify.coffee +++ b/lib/beautify.coffee @@ -9,7 +9,7 @@ languages = beautifier.languages defaultLanguageOptions = beautifier.defaultLanguageOptions # Lazy loaded dependencies fs = null -path = null +path = require("path") strip = null yaml = null LoadingView = null @@ -310,7 +310,7 @@ handleSaveEvent = => return return -Subscriber = require("emissary").Subscriber +{Subscriber} = require path.join(atom.packages.resourcePath, 'node_modules', 'emissary') Subscriber.extend plugin plugin.configDefaults = _.merge( analytics: true diff --git a/package.json b/package.json index 1a58a85..6e76a25 100644 --- a/package.json +++ b/package.json @@ -97,5 +97,10 @@ "editorconfig": "^0.11.4", "loophole": "^1.0.0", "typescript-formatter": "~0.1.4" - } + }, + "activationEvents": [ + "beautify", + "core:save", + "core:save-as" + ] }