import { NodeManager } from './node-manager' ; export class Yarn extends NodeManager { constructor ( cwd ) { super ( cwd , 'yarn' ) ; } install ( packageName , cwd , stream ? ) { return this . _exec ( 'add' , [ packageName ] , cwd , stream ) ; } installDev ( packageName , cwd , stream ? ) { return this . _exec ( 'add' , [ packageName , '-D' ] , cwd , stream ) ; } uninstall ( packageName , cwd , stream ? ) { return this . _exec ( 'remove' , [ packageName ] , cwd , stream ) ; } upgrade ( packageName , cwd , stream ? ) { return this . _exec ( 'upgrade' , [ packageName , '--latest' ] , cwd , stream ) ; } runScript ( scriptName , cwd , stream ? ) { return this . _exec ( 'run' , [ scriptName ] , cwd , stream ) ; } runScriptInBackground ( scriptName , cwd ? ) { return this . _execInBackground ( 'run' , [ scriptName ] , cwd ) ; } getExecutable ( ) { return this . _getManagerExecutable ( 'yarn' ) ; } }