You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: guides/appendix/configuration.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,7 +31,7 @@ For a complete list of command line options run `ember help`.
31
31
32
32
Some configuration is exposed through your `package.json` file.
33
33
34
-
If you have a nested repo structure (e.g., a monorepo using yarn workspaces) and want to allow `ember s` from the root of the repo, you can configure your `package.json` to look like:
34
+
If you have a nested repo structure (e.g., a monorepo using pnpm or yarn workspaces) and want to allow `ember s` from the root of the repo, you can configure your `package.json` to look like:
Copy file name to clipboardExpand all lines: guides/basic-use/assets-and-dependencies.md
+19-11Lines changed: 19 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,33 +17,33 @@ The code itself goes in `node_modules` during `npm install`, just like in many n
17
17
plus folders like `vendor` and `public` that can hold many other files of the developer's choice
18
18
19
19
<!--
20
-
If addons are installed accidentally with `npm install`or `yarn install`,
20
+
If addons are installed accidentally with `npm install`, `yarn install`, or `pnpm install`,
21
21
the blueprints can be run with .... what?
22
22
23
23
Added by @maxwondercorn:
24
24
What is now below - were should it go in the guide
25
25
26
-
If you accidentally install an Ember addon using either npmor Yarn, the default blueprint will not run. To run the blueprint use:
26
+
If you accidentally install an Ember addon using either npm, Yarn, or pnpm, the default blueprint will not run. To run the blueprint use:
27
27
28
28
```shell
29
29
ember generate <addon-name>
30
30
```
31
31
-->
32
32
33
-
## npm and Yarn
33
+
## Package Managers
34
34
35
-
Ember CLI supports both [npm](https://www.npmjs.com) and [Yarn](https://yarnpkg.com/)
35
+
Ember CLI supports [npm](https://www.npmjs.com), [Yarn](https://yarnpkg.com/), and [pnpm](https://pnpm.io)
36
36
for node modules management.
37
37
38
38
By default, new apps use `npm`.
39
39
Both tools offer similar functionality, and which one to choose is up to
40
40
the developer's preference.
41
-
Dependencies listed in `package.json` can be installed with either `npm install`or `yarn install`. The files for those packages are added to the `node_modules` folder of the app.
41
+
Dependencies listed in `package.json` can be installed with `npm install`, `yarn install`, or `pnpm install`. The files for those packages are added to the `node_modules` folder of the app.
42
42
43
-
There are two ways to switch from `npm` to `yarn`.
44
-
Either include an option when the app is created, like `ember new --yarn`,
45
-
or run `yarn install` to generate a `yarn.lock` file.
46
-
Ember will detect the `yarn.lock` file and start using it instead
43
+
There are two ways to switch from the default package manager, `npm`.
44
+
Either include an option when the app is created, like `ember new --yarn` or `ember new --pnpm`,
45
+
or run `yarn install`or `pnpm install`to generate the package manager's associated lockfile file.
46
+
Ember will detect the lockfile and start using it instead
47
47
for any `ember install some-addon-name` commands.
48
48
Don't forget to delete the `package-lock.json` file if the app
49
49
already has one.
@@ -52,21 +52,29 @@ file are present, Ember CLI will default to using Yarn.
52
52
However, having both files causes confusion for collaborators and
53
53
is incompatible with some CI systems.
54
54
55
-
To switch from `yarn`to `npm`, delete the `yarn.lock`
55
+
To switch back to `npm`, delete the lockfile from your package manager
56
56
and run `npm install` to generate a `package-lock.json`.
57
57
58
-
To have Ember CLI use `yarn` by default for all new projects, create a `.ember-cli` file in your home directory with:
58
+
To have Ember CLI use `yarn`or `pnpm`by default for all new projects, create a `.ember-cli` file in your home directory with:
59
59
60
60
```json
61
61
{
62
62
"yarn": true
63
63
}
64
64
```
65
65
66
+
or
67
+
```json
68
+
{
69
+
"pnpm": true
70
+
}
71
+
```
72
+
66
73
Further documentation about npm and Yarn is available at their official
Copy file name to clipboardExpand all lines: guides/basic-use/index.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,16 @@ Learn how to install the Ember CLI on Linux, Mac, and Windows.
2
2
3
3
## Prerequisites
4
4
5
-
*[npm](https://www.npmjs.com/get-npm) or [yarn](https://yarnpkg.com/en/docs/install)
5
+
*[npm](https://www.npmjs.com/get-npm), [yarn](https://yarnpkg.com/en/docs/install), or [pnpm](https://pnpm.io/installation)
6
6
*[git](https://git-scm.com/) is recommended, but not required
7
7
* Recent version of [node](https://nodejs.org/en/download/), which comes included in `yarn` or `npm`
8
8
* Mac and Linux users may need [Watchman](https://facebook.github.io/watchman/) (not the npm version!)
9
9
10
10
First, we need to have a package manager installed. A package manager installs new dependencies from the command line, whether they are used as commands or in the app itself.
11
-
Follow these installation instructions for [npm](https://www.npmjs.com/get-npm) or [yarn](https://yarnpkg.com/en/docs/install).
12
-
While these two tools have somewhat different features, both are compatible with Ember app development.
11
+
Follow these installation instructions for [npm](https://www.npmjs.com/get-npm), [yarn](https://yarnpkg.com/en/docs/install), or [pnpm](https://pnpm.io/installation).
12
+
While these tools have somewhat different features, both are compatible with Ember app development.
13
13
14
-
We'll know installation is successful when `npm --version`or `yarn --version` returns the version number.
14
+
We'll know installation is successful when `npm --version`, `yarn --version`, or `pnpm --version` returns the version number.
15
15
16
16
It is recommended to install the most recent LTS (long-term support) version of `node`.
17
17
Restart the console after installing your package manager.
Copy file name to clipboardExpand all lines: guides/writing-addons/addon-blueprints.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ The default blueprint is recognized because it normally has the same name as the
67
67
68
68
### Blueprints in development
69
69
70
-
When developing and testing your addon using either `npm link`or `yarn link` your addon's blueprint will not automatically run. To manually run and test the blue print you would use the following command:
70
+
When developing and testing your addon using `npm link`, `yarn link`, or `pnpm link` your addon's blueprint will not automatically run. To manually run and test the blue print you would use the following command:
Copy file name to clipboardExpand all lines: guides/writing-addons/intro-tutorial.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -50,17 +50,17 @@ Our goal is to be able to pass the `buttonLabel` value to the addon, just like w
50
50
51
51
### Trying out the addon template in an app
52
52
53
-
There are several options to see the addon in action. We could use `npm link`or `yarn link` to try it out locally or publish the addon online. We'll use `link` while we are still developing and testing.
53
+
There are several options to see the addon in action. We could use `npm link`, `yarn link`, or `pnpm link` to try it out locally or publish the addon online. We'll use `link` while we are still developing and testing.
54
54
55
55
**From the addon project directory:**
56
56
1. Since our addon uses a template, we need the template precompiler to be a `dependency` and not a `devDependency`. In the addon's `package.json`, move the entry for `ember-cli-htmlbars` into the `dependencies` listing. If this step is missed, there is a clear error message when we try to start the app that uses our addon.
57
-
2.`yarn install` or `npm install`
58
-
3. Run the command `yarn link` or `npm link`
57
+
2.`pnpm install`, `yarn install`, or `npm install`
58
+
3. Run the command `yarn link` or `npm link`. This step may be skipped if using `pnpm`.
59
59
60
60
**From the directory of the app using the addon:**
61
-
1.`yarn link <addon-name>` or `npm link <addon-name>`.
61
+
1.`pnpm link ../path/to-/the-addon`, `yarn link <addon-name>` or `npm link <addon-name>`.
62
62
2. In the Ember app's `package.json`, add a `devDependencies` entry for your addon, like `"addon-name": "*"`. The `*` means that it will include all version numbers of our addon.
63
-
3. Run `yarn install` or `npm install` in the app. (If you are using the app for the first time, you can use `npm install --prefer-offline` or `npm install --offline` instead. These alternative commands can speed up installation, because `npm install` checks the online npm registry for your addon instead of your local storage.)
63
+
3. Run `pnpm install`, `yarn install`, or `npm install` in the app. (If you are using the app for the first time, you can use `npm install --prefer-offline` or `npm install --offline` instead. These alternative commands can speed up installation, because `npm install` checks the online npm registry for your addon instead of your local storage.)
64
64
4. Add a reference to your addon's component somewhere in an app template, like `<ComponentName @buttonLabel="Register" />`
65
65
5. Run a local server with `ember serve` and visit [http://localhost:4200](http://localhost:4200)
66
66
@@ -69,7 +69,7 @@ We should now see our addon in action!
69
69
**Having problems?**
70
70
- Check to make sure that your `package.json` is valid, looking for missing commas or trailing commas.
71
71
- "Template precompiler" errors mean that you skipped Step 1 and 2 above.
72
-
-`404 not found` means we forgot to `yarn` or `npm install`
72
+
-`404 not found` means we forgot to `pnpm install`, `yarn install` or `npm install`
73
73
- Make sure all the files have been saved.
74
74
- Did you rename or relocate any files after they were created? This is prone to mistakes, and the resulting errors can be really strange. It is best to create files using the CLI.
0 commit comments