Skip to content

Commit

Permalink
Usability Improvements
Browse files Browse the repository at this point in the history
Adds JSHint command for changing build system to JSHint and building in on step.

Adds control-J shortcut and JSHint to Tools menu, contextual menu and Command Palette.

Adds package metadata JSON for indexing within Sublime Package Control.
  • Loading branch information
Jamie Hoover ⚔ committed Feb 19, 2012
1 parent 3639e2f commit 4dc6c11
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 9 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1 +1,2 @@
.DS_Store .DS_Store
JSHint.pyc
5 changes: 5 additions & 0 deletions Context.sublime-menu
@@ -0,0 +1,5 @@
[{
"id": "jshint",
"caption": "JSHint",
"command": "jshint"
}]
5 changes: 5 additions & 0 deletions Default.sublime-commands
@@ -0,0 +1,5 @@
[{
"id": "jshint",
"caption": "JSHint",
"command": "jshint"
}]
3 changes: 3 additions & 0 deletions Default.sublime-keymap
@@ -0,0 +1,3 @@
[{
"keys": ["ctrl+j"], "command": "jshint"
}]
8 changes: 8 additions & 0 deletions JSHint.py
@@ -0,0 +1,8 @@
import sublime, sublime_plugin

class JshintCommand(sublime_plugin.WindowCommand):
def run(self):
self.window.run_command('set_build_system', {
'file': 'Packages/JSHint/JSHint.sublime-build'
})
self.window.run_command('build')
10 changes: 10 additions & 0 deletions Main.sublime-menu
@@ -0,0 +1,10 @@
[{
"caption": "Tools",
"mnemonic": "t",
"id": "tools",
"children": [{
"id": "jshint",
"caption": "JSHint",
"command": "jshint"
}]
}]
13 changes: 5 additions & 8 deletions jshint.sublime-build
Expand Up @@ -5,16 +5,13 @@


"osx": { "osx": {
"path": "/usr/local/bin" "path": "/usr/local/bin"
} },


/* "linux": {
, "linux": { "path": "/usr/local/bin"
"path": "" }/*,
}
*/
/* "windows": {
, "windows": {
"path": "" "path": ""
}*/ }*/
} }
5 changes: 5 additions & 0 deletions package-metadata.json
@@ -0,0 +1,5 @@
{
"version": "0.2.0",
"url": "https://github.com/uipoet/sublime-jshint",
"description": "node-jshint current JavaScript file in Sublime Text 2"
}

0 comments on commit 4dc6c11

Please sign in to comment.