Conversation
hurrymaplelad
left a comment
There was a problem hiding this comment.
Thanks for the upgrade!
Mind adding example usage to the Readme.md file, then I'll publish it?
Also, if you're feeling ambitious, test coverage would help me make sure we don't accidentally break this with future changes:
https://github.com/hurrymaplelad/atom-alias-command/blob/master/spec/atom-alias-command-spec.coffee#L3
package.json
Outdated
| "name": "alias-command", | ||
| "main": "./lib/atom-alias-command", | ||
| "version": "1.0.1", | ||
| "version": "1.0.2", |
There was a problem hiding this comment.
I usually leave version bumps out of PRs so the package maintainer can use npm version at release time</minor nitpick>
| atom.commands.add scope, as, (event) -> | ||
| atom.commands.dispatch event.target, orig | ||
| if typeIsArray orig | ||
| atom.commands.dispatch event.target, o for o in orig |
There was a problem hiding this comment.
I couldn't find great info in the Atom docs about the queuing behavior of commands. For example if I orig: dispatch('core:save') then dispatch('core:close'), does Atom guarantee that save will complete before we close the file? Perhaps the two commands can be executed in any order.
We don't need to answer this now if it's working for you. Just something to keep in mind if you notice any flakiness saving.
There was a problem hiding this comment.
Found these related discussions:
atom/atom#2670 (comment)
atom/atom@9aee7d4
Sounds like Atom core's stance is that composing commands at the dispatch level is ambiguous (series or parallel? what if one fails?), and that the ambiguity should be resolved by defining a new command that does the desired composition at the JS API level.
Seems to me like a reasonable stance to support with this plugin. Principled objection?
Hi,
This PR is regarding the issue #1
Please note this is my first time with coffee script :)
Luis