mercredi 9 novembre 2016

How do I specify the path from which my Sublime Text Build will run?

I am trying to run mocha tests from my Sublime Text 3 build module. My mocha build is:

/* Mocha.sublime-build */
{
 "shell_cmd": "mocha -c --opts test/mocha.opts $file",
 "shell": true,
 "working_dir": "${project_path}",
 "target": "ansi_color_build",
 "syntax": "Packages/ANSIescape/ANSI.tmLanguage"
}

When I use Cmd+B to run my mocha build it responds with an error because my Node version doesn't support "import" statements. I have a mocha.opts file:

--require babel-register
--recursive

When running Mocha from the command line in the root project directory it works fine. How do I get the Mocha Build system to run from the root directory and receive instructions from mocha.opts?

Aucun commentaire:

Enregistrer un commentaire