import { JsPackageManager } from './JsPackageManager' ; export class NPMProxy extends JsPackageManager { readonly type = 'npm' ; installArgs : string [ ] | undefined ; initPackageJson ( ) { return this . executeCommand ( 'npm' , [ 'init' , '-y' ] ) ; } getRunEzbCommand ( ) { return 'npm run storybook' ; } getRunCommand ( command ) { return `npm run ${ command }` ; } getInstallArgs ( ) { this . installArgs = [ 'install' ] ; return this . installArgs ; } protected runInstall ( ) { this . executeCommand ( 'npm' , this . getInstallArgs ( ) , 'inherit' ) ; } protected runAddDeps ( dependencies , installAsDevDependencies ) { let args = [ ... dependencies ] ; if ( installAsDevDependencies ) { args = [ '-D' , ... args ] ; } this . executeCommand ( 'npm' , [ ... this . getInstallArgs ( ) , ... args ] , 'inherit' ) ; } }