Permalink
Browse files

Update with initial set of tools

  • Loading branch information...
1 parent 1a44d5a commit 3132e889eac3913890d0d21cff103d10b9f97d23 Charles Jolley committed Dec 13, 2011
@@ -4,9 +4,14 @@
"__doc__": "Run JSLint",
"command": "jslint"
},
+ {
+ "keys": ["alt+ctrl+j"],
+ "__doc__": "Run Unit Test",
+ "command": "run_js_test"
+ },
{
"keys": ["shift+ctrl+j"],
"__doc__": "Hide JSLint Viewer",
"command": "hide_jslint_result"
}
-]
+]
@@ -4,6 +4,11 @@
"__doc__": "Run JSLint",
"command": "jslint"
},
+ {
+ "keys": ["alt+ctrl+j"],
+ "__doc__": "Run Unit Test",
+ "command": "run_js_test"
+ },
{
"keys": ["shift+ctrl+j"],
"__doc__": "Hide JSLint Viewer",
@@ -4,9 +4,14 @@
"__doc__": "Run JSLint",
"command": "jslint"
},
+ {
+ "keys": ["alt+ctrl+j"],
+ "__doc__": "Run Unit Test",
+ "command": "run_js_test"
+ },
{
"keys": ["shift+ctrl+j"],
"__doc__": "Hide JSLint Viewer",
"command": "hide_jslint_result"
}
-]
+]
View
@@ -1,28 +1,32 @@
[
{
- "caption": "Bolt: Run JSLint",
+ "caption": "Node Tools: Run JSLint",
"command": "jslint"
},
{
- "caption": "Bolt: Show JSLint Result",
- "command": "show_jslint_result"
+ "caption": "Node Tools: Run Test",
+ "command": "run_jstest"
},
{
- "caption": "Bolt: Hide JSLint Result",
- "command": "hide_jslint_result"
+ "caption": "Node Tools: Show Results",
+ "command": "show_result"
},
{
- "caption": "Preferences: Bolt Settings – Default",
+ "caption": "Node Tools: Hide Result",
+ "command": "hide_result"
+ },
+ {
+ "caption": "Preferences: Node Tools Settings – Default",
"command": "open_file", "args":
{
- "file": "${packages}/sublime-bolt/sublime-bolt.sublime-settings"
+ "file": "${packages}/SublimeNodeTools/NodeTools.sublime-settings"
}
},
{
- "caption": "Preferences: Bolt Settings – User",
+ "caption": "Preferences: Node Tools Settings – User",
"command": "open_file", "args":
{
- "file": "${packages}/User/sublime-bolt.sublime-settings"
+ "file": "${packages}/User/NodeTools.sublime-settings"
}
}
]
View
@@ -4,25 +4,39 @@
"children":
[
{
- "caption": "Bolt",
- "id": "bolt",
+ "caption": "Node Tools",
+ "id": "node_tools",
"children":
[
{
"caption": "Run JSLint",
"command": "jslint"
},
{
- "caption": "Show JSLint Result",
- "command": "show_jslint_result"
+ "caption": "Toggle Autolint",
+ "command": "toggle_js_autolint"
},
{
- "caption": "Hide JSLint Result",
- "command": "hide_jslint_result"
+ "caption": "---"
},
{
- "caption": "Toggle Autolint",
- "command": "toggle_js_autolint"
+ "caption": "Run Unit Test",
+ "command": "run_js_test"
+ },
+ {
+ "caption": "Toggle Auto Test",
+ "command": "toggle_js_autotest"
+ },
+ {
+ "caption": "---"
+ },
+ {
+ "caption": "Show Result Pane",
+ "command": "show_result"
+ },
+ {
+ "caption": "Hide Result Pane",
+ "command": "hide_result"
}
]
}
@@ -38,23 +52,23 @@
"children":
[
{
- "caption": "Bolt",
+ "caption": "Node Tool",
"children":
[
{
"caption": "Settings – Default",
"command": "open_file",
"args":
{
- "file": "${packages}/sublime-bolt/sublime-bolt.sublime-settings"
+ "file": "${packages}/SublimeNodeTools/NodeTools.sublime-settings"
}
},
{
"caption": "Settings – User",
"command": "open_file",
"args":
{
- "file": "${packages}/User/sublime-bolt.sublime-settings"
+ "file": "${packages}/User/NodeTools.sublime-settings"
}
}
]
File renamed without changes.
View
107 README.md
@@ -1,102 +1,17 @@
-JSLint support for Sublime Text 2 by using jslint4java
-========================
+This package provides some useful tools to writing Node-powered JavaScript apps with Sublime.
-Sublime Text 2 (http://www.sublimetext.com/2) is a sophisticated text editor for code, html and prose. You'll love the slick user interface and extraordinary features.
+== What does it do?
-JSLint4Java (http://code.google.com/p/jslint4java/) is a java wrapper around the fabulous tool by Douglas Crockford, [jslint](http://jslint.com). It provides a simple interface for detecting potential problems in JavaScript code.
+ * Automatically lints both JS and CoffeeScript files when you save.
+ * Invokes Jasmine-based unit tests when you have the test open and hit
+ Ctrl-Opt-J
-This project provide a plugin to add JSLint support for Sublime Text 2.
+== Installation
-Features
--------------
+ 1. Make sure you have node and npm installed
+ 2. Clone this repostiory into `~/Library/Application Support/Sublime Text 2/Packages/SublimeNodeTools`
+ 3. cd into the directory and type `npm install` to setup the packages
+ 4. Restart Sublime (if needed)
-- JSLint: Run JSLint (ctrl+j)
+Everything should work automatically. You can find a menu for most commands under Tools/Node
-- JSLint: Show JSLint Result
-
-- Highlight error line by click on the result view
-
-- Cross platform: support Windows, Linux and Mac OS X
-
-Requirements
--------------
-
-- java, and make sure java has been added to PATH
-
-Installation
--------------
-
-- Using Package Control http://wbond.net/sublime_packages/package_control
- > Add Repository: https://github.com/fbzhong/sublime-jslint
-
-- Download and extract to Sublime Text 2 Packages folder
- > Windows: %APPDATA%\Sublime Text 2\Packages
- > Mac OS X: ~/Library/Application Support/Sublime Text 2/Packages
- > Linux: ~/.config/sublime-text-2/Packages
-
-How to use?
--------------
-
-- Using the Command Palette (Windows and Linux: Ctrl+Shift+P, OSX: Command+Shift+P) then search for:
-
- - JSLint: Run JSLint (ctrl+j)
- - JSLint: Show JSLint Result
-
-Open up a .js file and hit ctrl+j to run JSLint. An new output panel will appear giving you the JSLint results:
-
-Screenshots
--------------
-
-![](https://github.com/fbzhong/sublime-jslint/raw/master/images/screenshot.png)
-
-Settings
--------------
-
-Settings can be opened via the Command Palette, or the Preferences > Package Settings > JSLint > Settings – User menu entry.
-
- {
- // Path to the jslint jar.
- // Leave blank to use bundled jar.
- "jslint_jar": "",
-
- // Options pass to jslint.
- "jslint_options": "",
-
- // Ignore errors, regex.
- "ignore_errors":
- [
- // "Expected an identifier and instead saw 'undefined' \(a reserved word\)"
- ],
-
- // debug flag.
- "debug": false
- }
-
-New BSD License
--------------
-
-Copyright (c) 2011, Robin Zhong <fbzhong@gmail.com>
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of the Robin Zhong nor the
- names of its contributors may be used to endorse or promote products
- derived from this software without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
-ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
View
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>bundleUUID</key>
+ <string>72174d10-bb12-11e0-962b-112233445566</string>
+ <key>name</key>
+ <string>TestConsole</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>comment</key>
+ <string>test pass</string>
+ <key>match</key>
+ <string>\d+ (tests|assertions|examples?)</string>
+ <key>name</key>
+ <string>test.pass</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>test error</string>
+ <key>match</key>
+ <string>(\d+ errors)|(\d+\) Error:)</string>
+ <key>name</key>
+ <string>test.error</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>test fail</string>
+ <key>match</key>
+ <string>(\d+ failures?)|(\d+\) Failure:)</string>
+ <key>name</key>
+ <string>test.fail</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>dots painting</string>
+ <key>begin</key>
+ <string>Started</string>
+ <key>patterns</key>
+ <array>
+ <dict>
+ <key>match</key>
+ <string>\.+</string>
+ <key>name</key>
+ <string>test.pass</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>E+</string>
+ <key>name</key>
+ <string>test.error</string>
+ </dict>
+ <dict>
+ <key>match</key>
+ <string>F+</string>
+ <key>name</key>
+ <string>test.fail</string>
+ </dict>
+ </array>
+ <key>end</key>
+ <string>Spec</string>
+ </dict>
+ <dict>
+ <key>comment</key>
+ <string>color syntax response</string>
+ <key>match</key>
+ <string>Syntax OK</string>
+ <key>name</key>
+ <string>test.pass</string>
+ </dict>
+ </array>
+ <key>scopeName</key>
+ <string>tests.js</string>
+ <key>uuid</key>
+ <string>72174d10-bb12-11e0-962b-112233445566</string>
+</dict>
+</plist>
Binary file not shown.
Oops, something went wrong.

0 comments on commit 3132e88

Please sign in to comment.