Created
September 24, 2020 15:44
-
-
Save dsetzer/d4492f373c84dde535b090604cd4c3e6 to your computer and use it in GitHub Desktop.
npm helper function for nodejs notebooks in nteract
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function npm(command){ | |
child_process.exec(`npm ${command}`, (error, stdout, stderr) => { | |
console.log(stdout); | |
console.log(stderr); | |
if (error !== null) console.log(`exec error: ${error}`); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment