How can I prevent jsx watch from compiling swap files?

I use vim, there is an editor. JSX compiles swaps / temporary files. How can i avoid this?

Command line:

jsx --extension js --watch src/ build/ 

What I see in stdout:

 .helloworld.js.swp changed; rebuilding... ["helloworld"] ["helloworld"] helloworld.js~ changed; rebuilding... helloworld.js~ changed; rebuilding... ["helloworld"] ["helloworld"] 

Thanks.:)

+5
source share
1 answer

VIM Solution :

You can set the swap folder to another folder.

  set directory^=$HOME/.vim/swap// 

Grunt Solution :

You can use one of the many plugins available to view and recreate your jsx files. These plugins allow you to set which files to use during the build process. For example: https://www.npmjs.com/package/grunt-react

+2
source

Source: https://habr.com/ru/post/1200777/


All Articles