forked from Glavin001/atom-beautify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactored package, added keymaps and menus
- Loading branch information
1 parent
aa82d27
commit bb9d241
Showing
10 changed files
with
87 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,2 +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,22 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2014 Donald Pipowitch | ||
|
||
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
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,11 @@ | ||
# Keybindings require three things to be fully defined: A selector that is | ||
# matched against the focused element, the keystroke and the command to | ||
# execute. | ||
# | ||
# Below is a basic keybinding which registers on all platforms by applying to | ||
# the root workspace element. | ||
|
||
# For more detailed documentation see | ||
# https://atom.io/docs/latest/advanced/keymaps | ||
'.workspace .editor:not(.mini)': | ||
'ctrl-alt-b': 'beautify' |
File renamed without changes.
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,14 @@ | ||
# See https://atom.io/docs/latest/creating-a-package#menus for more details | ||
'context-menu': | ||
'.workspace .editor:not(.mini)': | ||
'Enable atom-beautify': 'beautify' | ||
|
||
'menu': [ | ||
{ | ||
'label': 'Packages' | ||
'submenu': [ | ||
'label': 'Beautify' | ||
'command': 'beautify' | ||
] | ||
} | ||
] |
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 |
---|---|---|
@@ -1,22 +1,21 @@ | ||
{ | ||
"name": "beautify", | ||
"name": "atom-beautify", | ||
"main": "./lib/atom-beautify", | ||
"version": "0.0.0", | ||
"private": true, | ||
"description": "Beautify HTML, CSS and Javascript in Atom", | ||
"license": "MIT", | ||
"activationEvents": ["beautify"], | ||
"repository": "https://github.com/donaldpipowitch/atom-beautify", | ||
"activationEvents": [ | ||
"beautify" | ||
], | ||
"license": "MIT", | ||
"author": { | ||
"name": "Donald Pipowitch", | ||
"email": "[email protected]", | ||
"url": "https://github.com/donaldpipowitch" | ||
}, | ||
"engines": { | ||
"atom": ">=0.50.0" | ||
"atom": ">0.50.0" | ||
}, | ||
"dependencies": {}, | ||
"devDependencies": { | ||
"dependencies": { | ||
"js-beautify": "~1.4.2" | ||
} | ||
} |
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,29 @@ | ||
AtomBeautify = require '../lib/atom-beautify' | ||
|
||
# Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs. | ||
# | ||
# To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit` | ||
# or `fdescribe`). Remove the `f` to unfocus the block. | ||
|
||
describe "AtomBeautify", -> | ||
activationPromise = null | ||
|
||
beforeEach -> | ||
atom.workspaceView = new WorkspaceView | ||
activationPromise = atom.packages.activatePackage('atomBeautify') | ||
|
||
# describe "when the beautify event is triggered", -> | ||
# it "attaches and then detaches the view", -> | ||
# expect(atom.workspaceView.find('.atom-beautify')).not.toExist() | ||
# | ||
# # This is an activation event, triggering it will cause the package to be | ||
# # activated. | ||
# atom.workspaceView.trigger 'beautify' | ||
# | ||
# waitsForPromise -> | ||
# activationPromise | ||
# | ||
# runs -> | ||
# expect(atom.workspaceView.find('.atom-beautify')).toExist() | ||
# atom.workspaceView.trigger 'beautify' | ||
# expect(atom.workspaceView.find('.atom-beautify')).not.toExist() |