diff --git a/contrib/npm.php b/contrib/npm.php index 3d8299335..f869577cb 100644 --- a/contrib/npm.php +++ b/contrib/npm.php @@ -19,6 +19,10 @@ return which('npm'); }); +set('bin/npx', function () { + return which('npx'); +}); + // Uses `npm ci` command. This command is similar to npm install, // except it's meant to be used in automated environments such as // test platforms, continuous integration, and deployment -- or diff --git a/docs/contrib/npm.md b/docs/contrib/npm.md index a28be9a5e..e9de0d148 100644 --- a/docs/contrib/npm.md +++ b/docs/contrib/npm.md @@ -38,11 +38,21 @@ return which('npm'); ``` +### bin/npx +[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L22) + + + +```php title="Default value" +return which('npx'); +``` + + ## Tasks ### npm\:install {#npm-install} -[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L28) +[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L32) Installs npm packages. @@ -54,7 +64,7 @@ install of your dependencies. ### npm\:build {#npm-build} -[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L33) +[Source](https://github.com/deployphp/deployer/blob/master/contrib/npm.php#L37) Runs npm build.