Permalink
Browse files

nodejs

  • Loading branch information...
1 parent aa3e1ab commit 463ba2ae951aaef9e95b1a94c37138aebdd99bb4 @kliu committed Apr 13, 2012
Showing with 2,761 additions and 35 deletions.
  1. BIN Packages/Default/Startup.cache
  2. BIN Packages/Default/Syntax Summary.cache
  3. +3 −5 Packages/HexViewer/hex_checksum.py
  4. +9 −8 Packages/HexViewer/hex_highlighter.py
  5. +1 −1 Packages/HexViewer/package-metadata.json
  6. +3 −6 Packages/HexViewer/tiger.py
  7. +2 −2 Packages/HexViewer/whirlpool.py
  8. +3 −0 Packages/Nodejs/.gitignore
  9. +20 −0 Packages/Nodejs/Context.sublime-menu
  10. +6 −0 Packages/Nodejs/Default (Linux).sublime-keymap
  11. +6 −0 Packages/Nodejs/Default (OSX).sublime-keymap
  12. +6 −0 Packages/Nodejs/Default (Windows).sublime-keymap
  13. +66 −0 Packages/Nodejs/Default.sublime-commands
  14. +70 −0 Packages/Nodejs/Main.sublime-menu
  15. +4 −0 Packages/Nodejs/Nodejs.message
  16. +325 −0 Packages/Nodejs/Nodejs.py
  17. +5 −0 Packages/Nodejs/Nodejs.sublime-build
  18. +1,437 −0 Packages/Nodejs/Nodejs.sublime-completions
  19. +13 −0 Packages/Nodejs/Nodejs.sublime-settings
  20. +74 −0 Packages/Nodejs/Readme.md
  21. +15 −0 Packages/Nodejs/Snippets/node-event-eventemitter.sublime-snippet
  22. +14 −0 Packages/Nodejs/Snippets/node-fs-readdir.sublime-snippet
  23. +11 −0 Packages/Nodejs/Snippets/node-http-createServer.sublime-snippet
  24. +18 −0 Packages/Nodejs/Snippets/node-https-createServer.sublime-snippet
  25. +19 −0 Packages/Nodejs/Snippets/node-https-get.sublime-snippet
  26. +29 −0 Packages/Nodejs/Snippets/node-https-request.sublime-snippet
  27. +1 −0 Packages/Nodejs/__init__.py
  28. 0 Packages/Nodejs/lib/__init__.py
  29. +51 −0 Packages/Nodejs/lib/command_thread.py
  30. +13 −0 Packages/Nodejs/messages/1.0.1.txt
  31. +74 −0 Packages/Nodejs/messages/install.txt
  32. +1 −0 Packages/Nodejs/package-metadata.json
  33. +9 −0 Packages/Nodejs/package.json
  34. +16 −0 Packages/Nodejs/tools/default_build.js
  35. +353 −0 Packages/Nodejs/tools/doc_builder.js
  36. +65 −0 Packages/Nodejs/tools/uglify_js.js
  37. +1 −1 Packages/Tag/Tag Lint/Commands.sublime-commands
  38. +2 −1 Packages/Tag/tag_indent.py
  39. +5 −9 Packages/Tag/tag_lint.py
  40. +9 −1 Packages/User/Default (OSX).sublime-keymap
  41. +2 −1 Packages/User/Package Control.sublime-settings
Binary file not shown.
Binary file not shown.
@@ -18,15 +18,13 @@
import whirlpool
except:
class whirlpool(object):
- pass
- whirlpool.whirlpool = None
+ whirlpool = None
try:
import tiger
except:
class tiger(object):
- pass
- tiger.tiger = None
+ tiger = None
DEFAULT_CHECKSUM = "md5"
VALID_HASH = []
@@ -157,7 +155,7 @@ def __init__(self, arg=''):
# Sublime Text Commands
-class checksum:
+class checksum(object):
thread = None
def __init__(self, hash_algorithm=None, data=""):
@@ -18,17 +18,18 @@
THROTTLING = False
-class Pref:
- def load(self):
- Pref.wait_time = 0.12
- Pref.time = time()
- Pref.modified = False
- Pref.ignore_all = False
+class Pref(object):
+ @classmethod
+ def load(cls):
+ cls.wait_time = 0.12
+ cls.time = time()
+ cls.modified = False
+ cls.ignore_all = False
-Pref().load()
+Pref.load()
-class HexHighlighter():
+class HexHighlighter(object):
def init(self):
init_status = False
self.address_done = False
@@ -1 +1 @@
-{"url": "https://github.com/facelessuser/HexViewer", "version": "2012.03.19.18.28.55", "description": "Hex viewer and editor for SublimeText2"}
+{"url": "https://github.com/facelessuser/HexViewer", "version": "2012.04.03.20.01.33", "description": "Hex viewer and editor for SublimeText2"}
@@ -21,7 +21,7 @@
BIG_ENDIAN = True
-class tiger:
+class tiger(object):
__name = 'tiger'
__digest_size = 24
@@ -590,7 +590,7 @@ def copy(self):
]
-class TigerStruct:
+class TigerStruct(object):
def __init__(self):
self.res = [0x0123456789ABCDEF, 0xFEDCBA9876543210, 0xF096A5B4C3B2E187]
self.length = 0
@@ -732,6 +732,7 @@ def tiger_finalize(tig):
def test_tiger_hash():
+ # TODO: Re-generate hashes with default endian
#Tests
assert tiger('').hexdigest() == \
'24f0130c63ac933216166e76b1bb925ff373de2d49584e7a'
@@ -769,7 +770,3 @@ def test_tiger_hash():
test.update('The quick brown fox jumps over the lazy dog')
assert test.hexdigest() == \
"33b3d0fbc7b8a2559b7b4689357d928c7202768b4c655f49"
-
-# BIG_ENDIAN = False
-# test_tiger_hash()
-# BIG_ENDIAN = True
@@ -29,7 +29,7 @@
DIGESTBITS = 512
-class whirlpool:
+class whirlpool(object):
__name = 'whirlpool'
__digest_size = DIGESTBYTES
@@ -623,7 +623,7 @@ def copy(self):
]
-class WhirlpoolStruct:
+class WhirlpoolStruct(object):
def __init__(self):
self.bitLength = [0] * 32
self.buffer = [0] * DIGESTBYTES
@@ -0,0 +1,3 @@
+*.pyc
+*.cache
+node_modules
@@ -0,0 +1,20 @@
+[{
+ "id": "nodejsmenu",
+ "caption": "Nodejs",
+ "children": [{
+ "id": "nodejsrunmenu",
+ "caption": "Run",
+ "children": [
+ { "id": "nodejsrun", "caption": "Run", "command": "node_run" },
+ { "id": "nodejsrunarguments", "caption": "Run + arguments", "command": "node_run_arguments" }
+ ]
+ },
+ {
+ "id": "nodejsdebugmenu",
+ "caption": "Debug",
+ "children": [
+ { "id": "nodejsdrun", "caption": "Debug", "command": "node_drun" },
+ { "id": "nodejsdrunarguments", "caption": "Debug + arguments", "command": "node_drun_arguments" }
+ ]
+ }]
+}]
@@ -0,0 +1,6 @@
+[
+ {"keys": ["alt+r"], "command": "node_run"},
+ {"keys": ["alt+d"], "command": "node_drun"},
+ {"keys": ["ctrl+alt+r"], "command": "node_run_arguments"},
+ {"keys": ["ctrl+alt+d"], "command": "node_drun_arguments"}
+]
@@ -0,0 +1,6 @@
+[
+ {"keys": ["ctrl+r"], "command": "node_run"},
+ {"keys": ["ctrl+d"], "command": "node_drun"},
+ {"keys": ["ctrl+alt+r"], "command": "node_run_arguments"},
+ {"keys": ["ctrl+alt+d"], "command": "node_drun_arguments"}
+]
@@ -0,0 +1,6 @@
+[
+ {"keys": ["alt+r"], "command": "node_run"},
+ {"keys": ["alt+d"], "command": "node_drun"},
+ {"keys": ["ctrl+alt+r"], "command": "node_run_arguments"},
+ {"keys": ["ctrl+alt+d"], "command": "node_drun_arguments"}
+]
@@ -0,0 +1,66 @@
+[{
+ "caption": "Nodejs::Run::Current File",
+ "command": "node_run"
+},
+{
+ "caption": "Nodejs::Run::Current File + Arguments",
+ "command": "node_run_arguments"
+},
+{
+ "caption": "Nodejs::Debug::Run::Current File",
+ "command": "node_drun"
+},
+{
+ "caption": "Nodejs::Debug::Run::Current File + Arguments",
+ "command": "node_drun_arguments"
+},
+{
+ "caption": "Nodejs::NPM::Command",
+ "command": "node_npm"
+},
+{
+ "caption": "Nodejs::NPM::Install",
+ "command": "node_npm_install"
+},
+{
+ "caption": "Nodejs::NPM::Uninstall",
+ "command": "node_npm_uninstall"
+},
+{
+ "caption": "Nodejs::NPM::Update",
+ "command": "node_npm_update"
+},
+{
+ "caption": "Nodejs::NPM::List",
+ "command": "node_npm_list"
+},
+{
+ "caption": "Nodejs::NPM::Publish",
+ "command": "node_npm_publish"
+},
+{
+ "caption": "Nodejs::NPM::Search",
+ "command": "node_npm_search"
+},
+{
+ "caption": "Nodejs::Build Completions",
+ "command": "node_builddocs"
+},
+{
+ "caption": "Nodejs::UglifyJS",
+ "command": "node_uglify"
+},
+{
+ "caption": "Nodejs::Default File Settings",
+ "command": "open_file",
+ "args": {
+ "file": "${packages}/Nodejs/Nodejs.sublime-settings"
+ }
+},
+{
+ "caption": "Nodejs::User File Settings",
+ "command": "open_file",
+ "args": {
+ "file": "${packages}/User/Nodejs.sublime-settings"
+ }
+}]
@@ -0,0 +1,70 @@
+[{
+ "caption": "Tools",
+ "mnemonic": "t",
+ "id": "tools",
+ "children": [{
+ "id": "nodejsmenu",
+ "caption": "Nodejs",
+ "children": [{
+ "id": "nodejsrunmenu",
+ "caption": "Run",
+ "children": [
+ { "id": "nodejsrun", "caption": "Run", "command": "node_run" },
+ { "id": "nodejsrunarguments", "caption": "Run + arguments", "command": "node_run_arguments" }
+ ]
+ },
+ {
+ "id": "nodejsdebugmenu",
+ "caption": "Debug",
+ "children": [
+ { "id": "nodejsdrun", "caption": "Debug", "command": "node_drun" },
+ { "id": "nodejsdrunarguments", "caption": "Debug + arguments", "command": "node_drun_arguments" }
+ ]
+ },
+ {
+ "id": "nodejsnpmmenu",
+ "caption": "npm",
+ "children": [
+ { "id": "nodejsnpmcommand", "caption": "Command", "command": "node_npm" },
+ { "id": "nodejsnpmsearch", "caption": "Search", "command": "node_npm_search" },
+ { "id": "nodejsnpminstall", "caption": "Install", "command": "node_npm_install" },
+ { "id": "nodejsnpmuninstall", "caption": "Uninstall", "command": "node_npm_uninstall" },
+ { "id": "nodejsnpmupdate", "caption": "Update", "command": "node_npm_update" },
+ { "id": "nodejsnpmlist", "caption": "List", "command": "node_npm_list" },
+ { "id": "nodejsnpmpublish", "caption": "Publish", "command": "node_npm_publish" }
+ ]
+ },
+ { "id": "nodejsuglify", "caption": "Uglify", "command": "node_uglify" }
+ ]
+ }]
+},
+{
+ "caption": "Preferences",
+ "mnemonic": "n",
+ "id": "preferences",
+ "children":[{
+ "caption": "Package Settings",
+ "mnemonic": "P",
+ "id": "package-settings",
+ "children":[{
+ "caption": "Nodejs",
+ "children": [{
+ "command": "open_file",
+ "args": {
+ "file": "${packages}/Nodejs/Nodejs.sublime-settings"
+ },
+ "caption": "Settings – Default"
+ },
+ {
+ "command": "open_file",
+ "args": {
+ "file": "${packages}/User/Nodejs.sublime-settings"
+ },
+ "caption": "Settings – User"
+ },
+ {
+ "caption": "-"
+ }]
+ }]
+ }]
+}]
@@ -0,0 +1,4 @@
+{
+ "install": "messages/install.txt",
+ "1.0.1": "messages/1.0.1.txt"
+}
Oops, something went wrong.

0 comments on commit 463ba2a

Please sign in to comment.