ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Nodejs

by tanepiper, varp ST3 Top 100

nodejs snippets and bindings for Sublime Text 3

Details

Installs

  • Total 202K
  • Win 110K
  • OS X 59K
  • Linux 34K
May 26 May 25 May 24 May 23 May 22 May 21 May 20 May 19 May 18 May 17 May 16 May 15 May 14 May 13 May 12 May 11 May 10 May 9 May 8 May 7 May 6 May 5 May 4 May 3 May 2 May 1 Apr 30 Apr 29 Apr 28 Apr 27 Apr 26 Apr 25 Apr 24 Apr 23 Apr 22 Apr 21 Apr 20 Apr 19 Apr 18 Apr 17 Apr 16 Apr 15 Apr 14 Apr 13 Apr 12 Apr 11
Windows 142 156 125 143 148 86 90 136 171 148 135 144 87 70 129 149 169 135 157 96 106 113 132 125 141 94 69 90 146 156 170 175 134 98 121 150 147 158 143 144 99 109 117 151 147 144
OS X 50 43 38 42 36 24 21 29 42 45 59 45 40 30 42 56 51 55 53 17 29 42 54 49 43 34 13 34 35 65 38 58 55 27 37 53 44 74 52 40 34 32 43 43 51 39
Linux 28 31 29 33 28 21 20 31 40 39 33 37 20 24 42 25 30 26 29 24 25 34 37 30 30 27 25 26 37 34 26 30 37 24 34 26 29 37 28 31 21 25 36 28 42 30

Readme

Source
raw.​githubusercontent.​com

Nodejs Sublime Text 3 Package

Overview

The Nodejs Sublime Text 3 Package provides a set of code completion, scripts and tools to work with nodejs.

Code Completion

The package code completion is generated from the main nodejs libraries and global namespaces. To invoke the code completion start typing the namespace you want (For example, type fs) and then Ctrl + Space, you get this:

A picture of the file system context menu

Node Commands

You can access node commands in two ways.

  • Via the menu in Tools -> Node
  • By accessing the Command Palette and typing node

The current commands available are (with Windows binding, other bindings are provided):

  • Run current script in node (Alt + R)
  • Run current script in node debug (Alt + D)
  • Run current script in node and arguments (Ctrl + Alt + r)
  • Run current script in node debug and arguments (Ctrl + Alt + D)
  • Uglify Code
  • NPM Command
  • Build documentation (builds the completion files)

Snippets

Also included are some boilerplate snippets. They include functionality such as a http server, reading the contents of a directory, etc.

To access these snippets type node in your editor followed by Ctrl + Space

If you have any boilerplate code you would like to see in here, get in touch.

Install

You can install this package from Sublime Text 3 package manager. Also you can install this package manually:

MacOSX

`git clone https://github.com/tanepiper/SublimeText-Nodejs.git ~/Library/Application\ Support/Sublime\ Text\ 3/Packages/Nodejs`

Windows

`git clone https://github.com/tanepiper/SublimeText-Nodejs "%APPDATA%\Sublime Text 3\Packages\Nodejs"`

Linux

`git clone https://github.com/tanepiper/SublimeText-Nodejs $HOME/.config/sublime-text-3/Packages/Nodejs`

Build Systems

PLEASE NOTE: The build system will be refactored to provide different nodejs build systems (such as jake)

If you have a JavaScript file open, by selecting Tools -> Build Systems -> Nodejs and then hitting Ctrl + B, you will activate the node build system on your file and node will try to run it. You may need to add a path variable to the settings object for this if your node executable is not found

TODO

  • uglify_js.js and other ./tools/*.js scripts don't work when the package is installed by SublimeText package manager
  • Refactor plugin's classes inheritance in Nodejs.py
  • Generate Sublime Text completions during installation phase depending on the version of installed Node
  • Check for nvm installation
  • Replace the Nodejs.sublime-build to work with jake
  • Reorganise menu structure
  • Improve code completion snippets where possible
  • Provide an interface for writing JavaScript plugins

Author & Contributors

The original author of this package Tane Piper. At the time the project maintainer is Vardan Pogosyan.