Skip to content

Latest commit

 

History

History
99 lines (67 loc) · 2.97 KB

README.md

File metadata and controls

99 lines (67 loc) · 2.97 KB

upbo

➰ Emacs Javascript Test Runner integration that support mode line report!

Upbo is the Korean pronunciation of karma.

Features

Mode line reporting (upbo minor mode)

Success

SUCCESS

Failed

FAILED

Error

ERROR

And also terminal log view(upbo view mode)

TERMINAL

Installation

Using package.el

You can install upbo with package-install:

M-x package-install [RET] upbo [RET]

Or by add following code to emacs initialize file

(unless (package-installed-p 'upbo)
  (package-install 'upbo))

If the installation have problem try package-refresh-contents:

M-x package-refresh-contents [RET]

Using use-package

(use-package upbo
  :ensure t)

Getting Started

Upbo recognizes project in the current buffer based on the git root. You can apply project-specific test settings using the define-upbo-test function in your init.el If you have not set up the project, upbo will find the kama.conf.js in git root.

Upbo uses upbo-karma-command variable as karma-cli path. If upbo-karma-command is nil, then by default it looks for a karma executable in global, and if it does not find it, it tries to execute in the project using npx.

Enable upbo mode

To enable in major buffer automatically, add upbo-mode to your major buffer mode hook like this:

(add-hook javascript-mode-hook 'upbo-mode)
(add-hook js2-mode-hook 'upbo-mode)

define-upbo-test

(upbo-define-test
  :path "/path/to/your/project/git/root"
  :browsers "ChromeHeadless"
  :conf-file "/path/to/your/karma-conf/karma.conf.js")
  • path is project git root path
  • browsers uses as karma --browsers option, Currently we support one browser for mode line reporting. if you don't have set, Upbo uses the browsers option of the karma configuration.
  • conf-file is karma configuration to use in the project

Key Bindings

In Minor mode

Keybinding Description
C-c, C-u, s Execute karma single run.
C-c, C-u, w Execute karma with auto watch.
C-c, C-u, r Open project upbo process view, you need to run karma first.

In upbo view mode

Keybinding Description
s Execute karma single run.
w Execute karma with auto watch.
k Kill upbo process of current project.
q Close upbo view.