Fixes #428. Switch to event-kit, replacing emissary

This commit is contained in:
Glavin Wiechert 2015-10-25 23:56:37 -03:00
parent a5b19efd58
commit a8abbbb1a2
2 changed files with 4 additions and 7 deletions

View File

@ -71,8 +71,7 @@
"csscomb": "^3.1.7",
"diff": "^2.1.0",
"editorconfig": "^0.12.2",
"emissary": "^1.3.3",
"event-kit": "^1.2.0",
"event-kit": "^1.4.1",
"expand-home-dir": "0.0.2",
"extend": "^3.0.0",
"gherkin": "2.12.2",

View File

@ -4,7 +4,7 @@ pkg = require('../package.json')
# Dependencies
plugin = module.exports
{CompositeDisposable} = require 'atom'
{CompositeDisposable} = require 'event-kit'
_ = require("lodash")
Beautifiers = require("./beautifiers")
beautifier = new Beautifiers()
@ -443,14 +443,12 @@ handleSaveEvent = ->
), 0
)
)
plugin.subscribe disposable
{Subscriber} = require path.join(atom.packages.resourcePath, 'node_modules', 'emissary')
Subscriber.extend plugin
plugin.subscriptions.add disposable
plugin.config = _.merge(require('./config.coffee'), defaultLanguageOptions)
plugin.activate = ->
@subscriptions = new CompositeDisposable
@subscriptions.add handleSaveEvent()
@subscriptions.add plugin.subscribe atom.config.observe("atom-beautify.beautifyOnSave", handleSaveEvent)
@subscriptions.add atom.config.observe("atom-beautify.beautifyOnSave", handleSaveEvent)
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:beautify-editor", beautify
@subscriptions.add atom.commands.add "atom-workspace", "atom-beautify:help-debug-editor", debug
@subscriptions.add atom.commands.add ".tree-view .file .name", "atom-beautify:beautify-file", beautifyFile