Skip to content

Instantly share code, notes, and snippets.

@dsetzer
Created September 24, 2020 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dsetzer/d4492f373c84dde535b090604cd4c3e6 to your computer and use it in GitHub Desktop.
Save dsetzer/d4492f373c84dde535b090604cd4c3e6 to your computer and use it in GitHub Desktop.
npm helper function for nodejs notebooks in nteract
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