]> git.madduck.net Git - etc/vim.git/blob - autoload/ale/node.vim

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Squashed '.vim/bundle/ale/' content from commit 22185c4c
[etc/vim.git] / autoload / ale / node.vim
1 " Author: w0rp <devw0rp@gmail.com>
2 " Description: Functions for working with Node executables.
3
4 call ale#Set('windows_node_executable_path', 'node.exe')
5
6 " Create a executable string which executes a Node.js script command with a
7 " Node.js executable if needed.
8 "
9 " The executable string should not be escaped before passing it to this
10 " function, the executable string will be escaped when returned by this
11 " function.
12 "
13 " The executable is only prefixed for Windows machines
14 function! ale#node#Executable(buffer, executable) abort
15     if has('win32') && a:executable =~? '\.js$'
16         let l:node = ale#Var(a:buffer, 'windows_node_executable_path')
17
18         return ale#Escape(l:node) . ' ' . ale#Escape(a:executable)
19     endif
20
21     return ale#Escape(a:executable)
22 endfunction