Closed bradford-fisher closed 4 years ago
jake is listing a nodejs Symbol defined on EventEmitter as a user defined Task.
const execSync = require("child_process").execSync; const desc = require("jake").desc; const namespace = require("jake").namespace; const task = require("jake").task; namespace("main", function() { desc("compile main project"); task("compile", function() { tsc("main"); }); }); namespace("test", function() { desc("compile test project"); task("compile", function() { tsc("test"); }); desc("run unit tests"); task("unit", [ "test:compile" ], function() { teenytest("build/test/**/*.test.js"); }); }); function teenytest(testPattern) { try { npx("teenytest", testPattern); } catch (error) { // Ignore test failures } } function tsc(projectName) { npx("tsc", `--build source/${projectName}`); } function npx(command, ...arguments) { execute("npx", command, ...arguments); } function execute(command, ...arguments) { execSync( `${command} ${arguments.join(" ")}`, { stdio: "inherit", windowsHide: true } ); }
PS C:\path\to\project> npx jake --tasks jake main:compile # compile main project jake test:compile # compile test project jake test:unit # run unit tests jake captureRejectionSymbol # nodejs.rejection <-- Problem Here
jake is listing a nodejs Symbol defined on EventEmitter as a user defined Task.
Example jakefile
Example output