Author: Kavit

0

How to run cpplint on recursively on multiple folders?

You can specify path to both the directories as arguments. In this example, they are specified as srcFiles and appFiles. const cppLint = path.resolve(“cpplint.py”); // get the path to cpplint.py const srcFiles = path.resolve(__dirname,...

0

Debug mocha using visual studio code

Add the following configuration in your launch.json { “name”: “Run mocha”, “type”: “node”, “request”: “launch”, “program”: “${workspaceRoot}/node_modules/mocha/bin/mocha”, “stopOnEntry”: false, “args”: [ “test/**/*.js”, “–inspect”, “–debug-brk”, “–no-timeouts” ], “cwd”: “${workspaceRoot}”, “runtimeExecutable”: null, “env”: { “NODE_ENV”: “testing”...

0

How to run cli/unix commands from nodejs scripts?

There are two ways to do this: child_process.exec(command[, options][, callback]) // ls.js const { exec } = require(‘child_process’); exec(‘ls -lh /usr’, (error, stdout, stderr) => { if (error) { console.error(`exec error: ${error}`); return; }...