javascript-tools.tmbundle

Essential Tools for developing Javascript in TextMate

  • 所有者: subtleGradient/javascript-tools.tmbundle
  • 平台:
  • 許可證:
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

How to install

  1. Clone it to your ~/Library/Application Support/TextMate/Pristine Copy/Bundles
  2. In TextMate choose the menu item…
    Bundles / Bundle Editor / Reload Bundles
  3. If node is not installed in your PATH, go to TextMate → Preferences → Advanced → Shell Variables and add /usr/local/bin, basically the path to where node lives on your machine (which node).


NOTE: These docs are now a little out-of-date.

JavaScript Tools TextMate Bundle

Help

Opens this help file.

Run JavaScript (⌘R)

Attempts to run the current javascript document or selection in TextMate's Web Preview window.

JavaScript Lint

With JavaScript Lint, you can check all your JavaScript source code for common mistakes without actually running the script or opening the web page.
http://javascriptlint.com/

  • Validate Syntax (⌃⇧V) uses Matthias Miller's JavaScript Lint to check your script for errors and warnings and shows the results in a new window. The Validate JavaScript window will give you a description and hyperlink when problems are found. The hyperlink will take you straight to the line and column where JavaScript Lint suspects the problem arises.

  • Validate Syntax Quick (⌘S) same as above except that instead of a dedicated window you simply get a tooltip showing the number of errors and warnings. This command overrides the Save behavior so every time you save your javascript it will be passed through jslint. Of course it only applies to javascript files so you don't need to worry about accidentally jslint'ing your non-javascript files.

  • Edit Lint Validation settings allows you to customize what jslint considers when checking your script. The format and meaning of the options are straightforward and well documented within the settings file itself.

Formatting / Compression

  • Format JavaScript (⌃Q) attempts to beautify your javascript by inserting uniform line breaks and indentation throughout your current document or selection.

  • Compress (current file) (⌃⌘C) uses a custom Rhino build from the Dojo Toolkit project to compress your current javascript document. Before compressing it attempts to insert missing semi-colons so you should consider running Validate Syntax and fixing missing semi-colons prior to using this command.

  • Dean Edwards Packer (current file) (⌃⌘C) compresses and obfuscates your current javascript document. It currently relies on the Packr ruby port which is based on version 3 of Packer. According to Dean Edwards, "All statements, including function declarations, must be correctly terminated with semi-colons" before you run this command. After an email exchange with James Coglan, author of Packr, it's been decided that base62 encoding not be on by default as having it off yields more efficiency when your scripts are gzipped.
    However, if you would like base62 encoding, just set the Variable TM_JST_PB62 to true in the Advanced pane of the TextMate preferences or in your TextMate Project variables (see the TextMate documentation for more info on setting environment variables).

  • YUI! Compressor (current file) (⌃⌘C) compresses your current javascript document. By default it assumes your character set is UTF-8. Additionally it strictly preserves semi-colons, i.e. it will not drop or attempt to insert any semi-colons. Both of these settings can be easily changed by opening the Bundle editor and adjusting the second line of this command through the Bundle editor.

  • Minimize (current file) (⌃⌘C) uses Douglas Crockford's JSMin to minimize your current javascript document. It will not do any semi-colon insertion or removal.

  • Minimize selection (⌃⌥⇧Q) same as the above except it only applies to the selected portion of your current javascript document.

  • Convert JavaScript to Bookmarklet (⌃⌥⇧Q) turns your current javascript selection or document into a bookmarklet for use in a web browser.

  • Convert Bookmarklet to JavaScript (⌃⌥⇧Q) does the opposite of the above; turns an existing bookmarklet into a standard javascript.

Licenses

概覽

名稱與所有者subtleGradient/javascript-tools.tmbundle
主編程語言JavaScript
編程語言JavaScript (語言數: 4)
平台
許可證
發布數0
創建於2008-04-17 04:43:04
推送於2015-09-01 20:05:00
最后一次提交2015-09-01 16:04:53
星數603
關注者數12
派生數96
提交數86
已啟用問題?
問題數15
打開的問題數2
拉請求數2
打開的拉請求數1
關閉的拉請求數0
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?
去到頂部