Skip to content

Commit

Permalink
Add pnpm adapter usage to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
SergeAstapov committed Mar 2, 2023
1 parent 17592f8 commit d104253
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,19 @@ module.exports = async function() {
dependencies will be restored to their prior state.
*/
useYarn: true,
/*
If set to true, all npm scenarios will use `pnpm` for install. At cleanup, your
dependencies will be restored to their prior state.
*/
usePnpm: true,

/*
buildManagerOptions allows you to opt-out of the default options such as `--ignore-engines --no-lockfile`.
The buildManagerOptions function is aware of each scenario so you can customize your options.
*/
buildManagerOptions(scenario) {
return ['--ignore-engines'];
}
},

scenarios: [
{
Expand All @@ -150,7 +155,17 @@ module.exports = async function() {
*/
resolutions: {
'lodash': '5.0.0'
}
},
/*
When `usePnpm` is true, you can optionally define pnpm overrides to enforce a
specific dependency version to be installed. This is useful if other libraries
you depend on include different versions of a package.
*/
"pnpm": {
"overrides": {
'lodash': '5.0.0'
}
},
/*
In order to easily test multiple editions ember-try merges any `ember` property specified
into the applications `package.json`. Values specified in the ember-try configuration will
Expand All @@ -171,7 +186,7 @@ module.exports = async function() {
devDependencies: {
'ember-data': '2.3.0',

'ember-source': await getChannelURL('canary')
'ember-source': await getChannelURL('canary'),

// you can remove any package by marking `null`
'some-optional-package': null
Expand All @@ -198,6 +213,10 @@ The `name` can be used to try just one scenario using the `ember try:one` comman

If you include `useYarn: true` in your `ember-try` config, all npm scenarios will use `yarn` for install with the `--no-lockfile` option. At cleanup, your dependencies will be restored to their prior state.

##### PnpM

If you include `usePnpm: true` in your `ember-try` config, all npm scenarios will use `pnpm` for install. At cleanup, your dependencies will be restored to their prior state.

##### A note on npm scenarios with lockfiles

Lockfiles are ignored by `ember-try`. (`yarn` will run with `--no-lockfile` and `npm` will be run with `--no-shrinkwrap`).
Expand Down

0 comments on commit d104253

Please sign in to comment.