Skip to content

Commit

Permalink
Rename composer-extra-assets-installed.json to hidden file
Browse files Browse the repository at this point in the history
Fixes possible issue with npm shrinkwrap failing due to extraneous file
  • Loading branch information
nsams authored Sep 7, 2016
1 parent e57557a commit 8421543
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Kwf/ComposerExtraAssets/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -299,8 +299,8 @@ private function _installNpmDependencies($path, $dependencies, $shrinkwrapDepend
$prevCwd = getcwd();
chdir($path);

if (file_exists('node_modules/composer-extra-assets-installed.json')) {
$installed = json_decode(file_get_contents('node_modules/composer-extra-assets-installed.json'), true);
if (file_exists('node_modules/.composer-extra-assets-installed.json')) {
$installed = json_decode(file_get_contents('node_modules/.composer-extra-assets-installed.json'), true);
if ($installed == $shrinkwrapDependencies) {
$this->io->write("npm dependencies in '$path' are up to date...");
chdir($prevCwd);
Expand Down Expand Up @@ -385,7 +385,7 @@ private function _installNpmDependencies($path, $dependencies, $shrinkwrapDepend

$installed = $shrinkwrapDependencies;
if (!$installed) $installed = $ret;
file_put_contents('node_modules/composer-extra-assets-installed.json', json_encode($installed));
file_put_contents('node_modules/.composer-extra-assets-installed.json', json_encode($installed));

chdir($prevCwd);

Expand Down

0 comments on commit 8421543

Please sign in to comment.