-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0afb832
Showing
6 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.DS_Store | ||
npm-debug.log | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
Copyright (c) 2015 Adam Hull | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining | ||
a copy of this software and associated documentation files (the | ||
"Software"), to deal in the Software without restriction, including | ||
without limitation the rights to use, copy, modify, merge, publish, | ||
distribute, sublicense, and/or sell copies of the Software, and to | ||
permit persons to whom the Software is furnished to do so, subject to | ||
the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be | ||
included in all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, | ||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF | ||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | ||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | ||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | ||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | ||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Atom aliasCommand | ||
|
||
A 'lil utility to register existing commands with new names. | ||
Useful if you're conditioned to look for a different name, like `Package Control: Install`. | ||
|
||
## Getting Started | ||
|
||
```sh | ||
> npm install -g atom-alias-command | ||
``` | ||
|
||
From you init.coffee (You can open this via `Application: Open Your Init Script`): | ||
```coffee | ||
aliasCommand = require 'atom-alias-command' | ||
|
||
aliasCommand 'tree-view:move', | ||
orig: 'tree-view:rename' | ||
|
||
aliasCommand 'package-control:install', | ||
orig: 'settings-view:install-packages-and-themes' | ||
|
||
# Takes an optional scope for commands that should only | ||
# appear when a particular element has focus | ||
aliasCommand 'grammar-selector:set-syntax', | ||
orig: 'grammar-selector:show' | ||
scope: 'atom-editor' | ||
``` | ||
|
||
## Running Tests | ||
```sh | ||
> apm test | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = aliasCommand = (as, {orig, scope}) -> | ||
scope ?= 'atom-workspace' | ||
atom.commands.add scope, as, (event) -> | ||
atom.commands.dispatch event.target, old |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
{ | ||
"name": "atom-alias-command", | ||
"main": "./lib/atom-alias-command", | ||
"version": "0.0.0", | ||
"description": "A short description of your package", | ||
"keywords": [ | ||
"alias", "command" | ||
], | ||
"activationCommands": { | ||
"atom-workspace": "atom-alias-command:toggle" | ||
}, | ||
"repository": "https://github.com/hurrymaplelad/atom-alias-command", | ||
"license": "MIT", | ||
"engines": { | ||
"atom": ">=1.0.0 <2.0.0" | ||
}, | ||
"dependencies": { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
aliasCommand = require '../lib/atom-alias-command' | ||
|
||
describe "aliasCommand", -> | ||
it "doesn't explode", -> | ||
aliasCommand 'new:action', | ||
orig: 'boring:old-action' |