composer-npm-bridge
composer-npm-bridge copied to clipboard
Add support for Yarn
Yarn is great. It would be nice to support it.
Interestingly, yarn install features a --pure-lockfile flag, which seems perfect for usage with composer-npm-bridge. It's a pity that NPM doesn't support something similar.
Relates to #20.
I just found out about npm ci, which looks awesome.
So the behavior could be something like this:
- Choose a "driver":
- Can be manually specified in
composer.jsonextra.npm-bridge.driver - Defaults to
"yarn"ifyarn.lockis present in the package root - Falls back to
"npm"
- Can be manually specified in
- If using the Yarn driver:
- If the lock file is present, install packages with
yarn install --pure-lockfile - If the lock file is absent, install packages with
yarn install --no-lockfile
- If the lock file is present, install packages with
- If using the NPM driver:
- If the lock file is present, install packages with
npm ci - If the lock file is absent, install packages with
npm install --no-package-lock
- If the lock file is present, install packages with