Integrate Sublime Text 2 with Karma

When developing AngularJS, I have an open terminal window with karma running (view file changes). When coding, I go back and forth between Sublime Text 2 and the terminal window showing the results of the Karma test.

I find this pretty annoying and I just saw in egghead.io that this guy has Karma results integrated into WebStorm.

Is there something similar for Sublime Text? I could not find any packages related to karma.

+6
source share
2 answers

You can use the build system to integrate the two - it opens the ST console and displays the results.

Something like this is what you are looking for:

 "build_systems": [ { "name": "Karma Test", "cmd": ["karma", "start", "--no-colors"], "working_dir": "$project_path" } ] 
0
source

Go to "Tools | Create System | New Build System" and enter the following code:

 { "path": "/usr/local/share/npm/bin:/usr/local/bin:$PATH", "working_dir": "${project_path:${folder}}", "cmd": ["karma", "start"] } 

Can be found here:.

It is also the best example for creating custom text-building systems in sublime text that I have seen.

Greetings

+3
source

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


All Articles