New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make npm-cache check also composer.json #35

Merged
merged 2 commits into from Jan 22, 2016

Conversation

Projects
None yet
3 participants
@EHER
Contributor

EHER commented Jan 20, 2016

fixes #21

@EHER EHER changed the title from Make npm-cache check also composer.json (fix #21) to Make npm-cache check also composer.json Jan 20, 2016

var composerJsonPath = path.resolve(process.cwd(), 'composer.json');
if (fs.existsSync(composerLockPath)) {
logger.logInfo('[composer] using composer.lock instead of composer.json');

This comment has been minimized.

@driesvints

driesvints Jan 22, 2016

I'd actually give a notification when it's using composer.json instead of composer.lock. composer.lock should be the default.

@driesvints

driesvints Jan 22, 2016

I'd actually give a notification when it's using composer.json instead of composer.lock. composer.lock should be the default.

This comment has been minimized.

@EHER

EHER Feb 16, 2016

Contributor

👍

@EHER

EHER Feb 16, 2016

Contributor

👍

}
return isUsingComposerLock ? composerLockPath : composerJsonPath;
};

This comment has been minimized.

@driesvints

driesvints Jan 22, 2016

Like so:

var isUsingComposerLock = true;

// Returns path to configuration file for composer. 
// Uses composer.json if composer.lock doesn't exists;
// otherwise, defaults to composer.lock
var getComposerConfigPath = function () {
  var composerLockPath = path.resolve(process.cwd(), 'composer.lock');
  var composerJsonPath = path.resolve(process.cwd(), 'composer.json');

  if (! fs.existsSync(composerLockPath)) {
    logger.logInfo('[composer] using composer.json instead of composer.lock');
    isUsingComposerLock = false;
  }

  return ! isUsingComposerLock ? composerJsonPath : composerLockPath;
};
@driesvints

driesvints Jan 22, 2016

Like so:

var isUsingComposerLock = true;

// Returns path to configuration file for composer. 
// Uses composer.json if composer.lock doesn't exists;
// otherwise, defaults to composer.lock
var getComposerConfigPath = function () {
  var composerLockPath = path.resolve(process.cwd(), 'composer.lock');
  var composerJsonPath = path.resolve(process.cwd(), 'composer.json');

  if (! fs.existsSync(composerLockPath)) {
    logger.logInfo('[composer] using composer.json instead of composer.lock');
    isUsingComposerLock = false;
  }

  return ! isUsingComposerLock ? composerJsonPath : composerLockPath;
};

This comment has been minimized.

@EHER

EHER Feb 16, 2016

Contributor

Make sense...

I'll create another PR ;)

Thanks

@EHER

EHER Feb 16, 2016

Contributor

Make sense...

I'll create another PR ;)

Thanks

swarajban added a commit that referenced this pull request Jan 22, 2016

Merge pull request #35 from EHER/master
Make npm-cache check also composer.json

@swarajban swarajban merged commit 4a198ef into swarajban:feature/pull-requests Jan 22, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment