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 ```coffeescript
'.editor': '.editor':
'ctrl-alt-b': 'beautify:beautify-editor' 'ctrl-alt-b': 'atom-beautify:beautify-editor'
``` ```
### Package Options ### Package Options

View File

@ -8,4 +8,4 @@
# For more detailed documentation see # For more detailed documentation see
# https://atom.io/docs/latest/advanced/keymaps # https://atom.io/docs/latest/advanced/keymaps
'atom-text-editor': '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 # See https://atom.io/docs/latest/creating-a-package#menus for more details
'context-menu': 'context-menu':
'atom-workspace atom-text-editor:not(.mini)': [ 'atom-workspace atom-text-editor:not(.mini)': [
{label: 'Beautify editor contents', command: 'beautify:beautify-editor'} {label: 'Beautify editor contents', command: 'atom-beautify:beautify-editor'}
{label: 'Debug Atom Beautify', command: 'beautify:help-debug-editor'} {label: 'Debug Atom Beautify', command: 'atom-beautify:help-debug-editor'}
] ]
'.tree-view .file > .name': [ '.tree-view .file > .name': [
{label: 'Beautify File', command: 'beautify:beautify-file'} {label: 'Beautify File', command: 'atom-beautify:beautify-file'}
] ]
# '.tree-view .directory > .header > .name': [ # '.tree-view .directory > .header > .name': [
# {label: 'Beautify Directory', command: 'beautify:beautify-directory'} # {label: 'Beautify Directory', command: 'atom-beautify:beautify-directory'}
# ] # ]
'menu': [ 'menu': [
@ -19,11 +19,11 @@
'submenu': [ 'submenu': [
{ {
'label': 'Beautify' 'label': 'Beautify'
'command': 'beautify:beautify-editor' 'command': 'atom-beautify:beautify-editor'
} }
{ {
'label': 'Debug' 'label': 'Debug'
'command': 'beautify:help-debug-editor' 'command': 'atom-beautify:help-debug-editor'
} }
] ]
] ]

View File

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

View File

@ -383,7 +383,11 @@ plugin.config = _.merge(
plugin.activate = -> plugin.activate = ->
handleSaveEvent() handleSaveEvent()
plugin.subscribe atom.config.observe("atom-beautify.beautifyOnSave", handleSaveEvent) plugin.subscribe atom.config.observe("atom-beautify.beautifyOnSave", handleSaveEvent)
atom.commands.add "atom-workspace", "beautify:beautify-editor", beautify atom.commands.add "atom-workspace", "atom-beautify:beautify-editor", beautify
atom.commands.add "atom-workspace", "beautify:help-debug-editor", debug atom.commands.add "atom-workspace", "atom-beautify:help-debug-editor", debug
atom.commands.add ".tree-view .file .name", "beautify:beautify-file", beautifyFile atom.commands.add ".tree-view .file .name", "atom-beautify:beautify-file", beautifyFile
atom.commands.add ".tree-view .directory .name", "beautify:beautify-directory", beautifyDirectory 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)