Closes #178. Change commands' namespace from "beautify" to "atom-beautify"

This commit is contained in:
Glavin Wiechert 2015-05-06 13:00:51 -03:00
parent a94721e1b5
commit 66c1522dcc
5 changed files with 20 additions and 15 deletions

View File

@ -81,7 +81,7 @@ For example:
```coffeescript
'.editor':
'ctrl-alt-b': 'beautify:beautify-editor'
'ctrl-alt-b': 'atom-beautify:beautify-editor'
```
### Package Options

View File

@ -8,4 +8,4 @@
# For more detailed documentation see
# https://atom.io/docs/latest/advanced/keymaps
'atom-text-editor':
'ctrl-alt-b': 'beautify:beautify-editor'
'ctrl-alt-b': 'atom-beautify:beautify-editor'

View File

@ -1,14 +1,14 @@
# See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu':
'atom-workspace atom-text-editor:not(.mini)': [
{label: 'Beautify editor contents', command: 'beautify:beautify-editor'}
{label: 'Debug Atom Beautify', command: 'beautify:help-debug-editor'}
{label: 'Beautify editor contents', command: 'atom-beautify:beautify-editor'}
{label: 'Debug Atom Beautify', command: 'atom-beautify:help-debug-editor'}
]
'.tree-view .file > .name': [
{label: 'Beautify File', command: 'beautify:beautify-file'}
{label: 'Beautify File', command: 'atom-beautify:beautify-file'}
]
# '.tree-view .directory > .header > .name': [
# {label: 'Beautify Directory', command: 'beautify:beautify-directory'}
# {label: 'Beautify Directory', command: 'atom-beautify:beautify-directory'}
# ]
'menu': [
@ -19,11 +19,11 @@
'submenu': [
{
'label': 'Beautify'
'command': 'beautify:beautify-editor'
'command': 'atom-beautify:beautify-editor'
}
{
'label': 'Debug'
'command': 'beautify:help-debug-editor'
'command': 'atom-beautify:help-debug-editor'
}
]
]

View File

@ -79,16 +79,17 @@
},
"activationCommands": {
"atom-workspace": [
"beautify:help-debug-editor",
"atom-beautify:help-debug-editor",
"atom-beautify:beautify-editor",
"beautify:beautify-editor",
"core:save",
"core:save-as"
],
".tree-view .file .name": [
"beautify:beautify-file"
"atom-beautify:beautify-file"
],
".tree-view .directory .name": [
"beautify:beautify-directory"
"atom-beautify:beautify-directory"
]
},
"keywords": [

View File

@ -383,7 +383,11 @@ plugin.config = _.merge(
plugin.activate = ->
handleSaveEvent()
plugin.subscribe atom.config.observe("atom-beautify.beautifyOnSave", handleSaveEvent)
atom.commands.add "atom-workspace", "beautify:beautify-editor", beautify
atom.commands.add "atom-workspace", "beautify:help-debug-editor", debug
atom.commands.add ".tree-view .file .name", "beautify:beautify-file", beautifyFile
atom.commands.add ".tree-view .directory .name", "beautify:beautify-directory", beautifyDirectory
atom.commands.add "atom-workspace", "atom-beautify:beautify-editor", beautify
atom.commands.add "atom-workspace", "atom-beautify:help-debug-editor", debug
atom.commands.add ".tree-view .file .name", "atom-beautify:beautify-file", beautifyFile
atom.commands.add ".tree-view .directory .name", "atom-beautify:beautify-directory", beautifyDirectory
# Deprecated command
atom.commands.add "atom-workspace", "beautify:beautify-editor", ->
atom?.notifications.addWarning("The command \"beautify:beautify-editor\" has been removed and changed to \"atom-beautify:beautify-editor\".", dismissable: true)