Skip to content

Ability to run npm tests and file clickable on error output  #306

@shakthimaan

Description

@shakthimaan

Hi,

Firstly, thanks for writing and maintaining coffee-mode.
#1 Is there a way to run 'npm run tests' defined in a project package.json from coffee-mode. I currently use:

(setq inferior-js-mode-hook
      (lambda ()
        ;; We like nice colors
        (ansi-color-for-comint-mode-on)
        ;; Deal with some prompt nonsense
        (add-to-list
         'comint-preoutput-filter-functions
         (lambda (output)
           (replace-regexp-in-string "\033\\[[0-9]+[GK]" "" output)))))

and run "npm run test" manually in M-x shell. But, I would like to be able to do it with a short-cut. Is there a way to enable this mode automatically when opening *.coffee files?
#2 If there are errors in the npm output, the errored files are not clickable in the Emacs buffer. Is there a way to change the format of npm output such that the files are clickable inside Emacs buffers?

I was not able to use the following for *.coffee files:
https://github.com/startup-class/dotfiles/blob/master/.emacs.d/js-config.el

Appreciate your help in this regard.

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions