Compilation of some CoffeeScript files while saving

I work with CoffeeScript in Node and a browser, and I only want to compile browser-specific files.

I have vim to compile a file if it has an extension .js.coffeebut writes to the file with the extension .js.js. I can pass the arguments to the compilation command, but then I need vim to find out the file name, and then remove the extra one .js.

Here is the relevant part of my vimrc file.

au BufWritePost *.js.coffee CoffeeMake! 
+3
source share
2 answers

, . , Vim CoffeeScript, . , , ( ):-)

- . coffee .js.coffee. , .js.js.

, , cake . coffee .js, . Cakefile , , - .

, vim, ,

:!cake build

.

, script , github, , , . www, , ( ) src. . Coffee .js, html. , .js, .

0

:

0

All Articles