php - Is it possible to check if npm is installed in the system using composer? -
i writing composer file. in file checking whether imagick , mysql installed or not. want make sure whether npm installed in system or not. possible? in advance.
you can use exec run npm -v , check exit code.
exec('npm -v', $foo, $exitcode); if ($exitcode === 0) { echo 'npm installed!'; }
Comments
Post a Comment