PHP Class Eloquent\Composer\NpmBridge\NpmClient

Datei anzeigen Open project: eloquent/composer-npm-bridge Class Usage Examples

Public Methods

Method Description
__construct ( Composer\Util\ProcessExecutor $processExecutor, ExecutableFinder $executableFinder, callable $getcwd = 'getcwd', callable $chdir = 'chdir' ) Construct a new NPM client.
create ( ) : self Create a new NPM client.
install ( string | null $path = null, boolean | null $isDevMode = null ) Install NPM dependencies for the project at the supplied path.
shrinkwrap ( string | null $path = null ) Shrink-wrap NPM dependencies for the project at the supplied path.
update ( string | null $path = null ) Update NPM dependencies for the project at the supplied path.

Private Methods

Method Description
executeNpm ( $arguments, $workingDirectoryPath )
npmPath ( )

Method Details

__construct() public method

Construct a new NPM client.
public __construct ( Composer\Util\ProcessExecutor $processExecutor, ExecutableFinder $executableFinder, callable $getcwd = 'getcwd', callable $chdir = 'chdir' )
$processExecutor Composer\Util\ProcessExecutor The process executor to use.
$executableFinder Symfony\Component\Process\ExecutableFinder The executable finder to use.
$getcwd callable The getcwd() implementation to use.
$chdir callable The chdir() implementation to use.

create() public static method

Create a new NPM client.
public static create ( ) : self
return self The newly created client.

install() public method

Install NPM dependencies for the project at the supplied path.
public install ( string | null $path = null, boolean | null $isDevMode = null )
$path string | null The path to the NPM project, or null to use the current working directory.
$isDevMode boolean | null True if dev dependencies should be included.

shrinkwrap() public method

Shrink-wrap NPM dependencies for the project at the supplied path.
public shrinkwrap ( string | null $path = null )
$path string | null The path to the NPM project, or null to use the current working directory.

update() public method

Update NPM dependencies for the project at the supplied path.
public update ( string | null $path = null )
$path string | null The path to the NPM project, or null to use the current working directory.