import { NodeManager } from './node-manager' ; export class Npm extends NodeManager { constructor ( cwd ) { super ( cwd , 'npm' ) ; } install ( packageName , cwd ? , stream ? ) { return this . _exec ( 'install' , [ packageName , '--save' ] , cwd , stream ) ; } installDev ( packageName , cwd ? , stream ? ) { return this . _exec ( 'install' , [ packageName , '--save-dev' ] , cwd , stream ) ; } uninstall ( packageName , cwd ? , stream ? ) { return this . _exec ( 'uninstall' , [ packageName , '--save' ] , cwd , stream ) ; } upgrade ( packageName , cwd ? , stream ? ) { return this . _exec ( 'install' , [ packageName , '--save' ] , cwd , stream ) ; } runScript ( scriptName , cwd , stream ? ) { return this . _exec ( 'run-script' , [ scriptName ] , cwd , stream ) ; } runScriptInBackground ( scriptName , cwd ? ) { return this . _execInBackground ( 'run-script' , [ scriptName ] , cwd ) ; } getExecutable ( ) { return this . _getManagerExecutable ( 'npm' ) ; } }