Added start of jasmine compiler for :make
Map <leader>m in jasmine buffers to :make, which is rake -f Rakefile jasmine:ci
This commit is contained in:
parent
cf5642dd06
commit
34ce6b2e31
@ -39,6 +39,7 @@ By default, the plugin assumes the templates are in bundle/jasmine/template and
|
|||||||
h2. Running Specs
|
h2. Running Specs
|
||||||
|
|
||||||
I'm slowly working on interactive spec running support. Currently, the Jasmine() command is provided for jasmine buffers. When invoked, it searches the current/parent directories of that buffer for the nearest Rakefile and invokes rake jasmine:ci to run all specs.
|
I'm slowly working on interactive spec running support. Currently, the Jasmine() command is provided for jasmine buffers. When invoked, it searches the current/parent directories of that buffer for the nearest Rakefile and invokes rake jasmine:ci to run all specs.
|
||||||
|
Jasmine buffers now have compiler set to the jasmine compiler and <leader>m is mapped to run :Jasmine -> jasmine#un_tests -> :make -> rake jasmine:ci
|
||||||
|
|
||||||
I plan on adding Red/Green support, as well as quickfix error support.
|
I plan on adding Red/Green support, as well as quickfix error support.
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ endfunction
|
|||||||
|
|
||||||
function jasmine#run_tests()
|
function jasmine#run_tests()
|
||||||
let b:jasmine_root = jasmine#find_root()
|
let b:jasmine_root = jasmine#find_root()
|
||||||
execute "!rake --rakefile=\"".b:jasmine_rakefile."\" jasmine:ci"
|
execute "make --rakefile=\"".b:jasmine_rakefile."\" jasmine:ci"
|
||||||
endfunction
|
endfunction
|
||||||
|
|
||||||
function jasmine#redbar()
|
function jasmine#redbar()
|
||||||
|
12
compiler/jasmine.vim
Normal file
12
compiler/jasmine.vim
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
if exists("current_compiler")
|
||||||
|
finish
|
||||||
|
endif
|
||||||
|
|
||||||
|
let current_compiler = "jasmine"
|
||||||
|
|
||||||
|
if exists(":CompilerSet") != 2
|
||||||
|
command -nargs=* CompilerSet setlocal <args>
|
||||||
|
endif
|
||||||
|
|
||||||
|
CompilerSet makeprg=rake "$*"
|
||||||
|
CompilerSet errorformat=\ %#%f(%l\\\,%c):\ %m
|
@ -4,6 +4,9 @@ endif
|
|||||||
|
|
||||||
let b:did_ftplugin = 1
|
let b:did_ftplugin = 1
|
||||||
|
|
||||||
|
compiler jasmine
|
||||||
|
map <buffer> <leader>m :Jasmine<CR>
|
||||||
|
|
||||||
call jasmine#load_snippets()
|
call jasmine#load_snippets()
|
||||||
|
|
||||||
command! Jasmine :call jasmine#run_tests()
|
command! Jasmine :call jasmine#run_tests()
|
||||||
|
Loading…
Reference in New Issue
Block a user