Skip to content

Commit 0b684e2

Browse files
BradenLawrenceGaurav0
authored andcommitted
Remove references to Bower (#26)
* Remove references to Bower - Partially addressing issue #21 - Followup to PR #19 - Replaced Bower with Yarn where it makes sense - Explained interaction between yarn.lock and package-lock.json - Explained how EmberCLI does not watch for npm install packages - Did NOT address any of the Bower references within code examples * Correct capitalization and improve clarity - Change all instances of NPM to npm - Change all instances of yarn to Yarn - Clarify users would be installing and using Yarn, not just including a yarn.lock file - Add node_module as a location assets can be imported from
1 parent 2375f4f commit 0b684e2

File tree

1 file changed

+22
-31
lines changed

1 file changed

+22
-31
lines changed

guides/legacy/dependencies.md

Lines changed: 22 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,30 @@
1-
### NPM/Yarn and Bower Configuration
1+
### NPM and Yarn Configuration
22

3-
Ember CLI supports [NPM](https://www.npmjs.com), [yarn](https://yarnpkg.com/)
4-
and optionally [Bower](http://bower.io/) for dependency management. It will
5-
detect whether you are using npm or yarn by the presence of a `yarn.lock` file
6-
in your project.
7-
8-
A newly generated Ember CLI project only has NPM dependencies, so you will
9-
notice a `package.json` file at the root of your project, but not a `bower.json`.
10-
To use Bower packages, you will have to first run `bower init` to create a
11-
`bower.json` file also at the root of the project.
12-
13-
NPM's `package.json` together with Bower's `bower.json` allow you to declare
14-
the dependencies of your project.
15-
Changes to your dependencies should be managed through these files, rather
16-
than manually installing packages individually.
3+
Ember CLI supports [npm](https://www.npmjs.com) and [Yarn](https://yarnpkg.com/)
4+
for dependency management. A newly generated Ember CLI project only has npm
5+
dependencies, so it will include a `package.json` file and use npm by default.
6+
If you use Yarn to manage dependencies, the CLI will detect the `yarn.lock` file
7+
and use Yarn instead. In cases where both a `yarn.lock` file and a `package-lock.json`
8+
file are present, Ember CLI will default to using Yarn.
179

10+
Changes to your dependencies should be managed through your `package.json` file.
1811
Executing `npm install` will install all of the dependencies listed in
19-
`package.json` in one step. Similarly, executing `bower install` will install
20-
all of the dependencies listed in `bower.json` in one step.
12+
`package.json` in one step.
2113

22-
Ember CLI is configured to have git ignore your `bower_components` and
23-
`node_modules` directories by default. Using the Bower and NPM configuration
24-
files allows collaborators to fork your repo and get their dependencies installed
25-
locally by executing `npm install` and `bower install` themselves.
14+
Ember CLI is configured to have git ignore your `node_modules` directories by
15+
default. Using the npm configuration files allows collaborators to fork your
16+
repo and get their dependencies installed locally by executing
17+
`npm install` themselves.
2618

27-
Ember CLI watches `bower.json` for changes. Thus it reloads your app if you
28-
install new dependencies via `bower install <dependencies> --save`. If you
29-
install NPM dependencies via `npm install <dependencies> --save`, you will need
30-
to restart your Ember CLI server session manually.
19+
Ember CLI will not watch for changes in your `package.json` file. Therefore,
20+
if you install npm dependencies via `npm install <dependencies> --save`, you will
21+
need to restart your Ember CLI server session manually.
3122

32-
Further documentation about NPM and Bower is available at their official
23+
Further documentation about npm and Yarn is available at their official
3324
documentation pages:
3425

35-
* [Bower](http://bower.io/)
36-
* [NPM](https://www.npmjs.com)
26+
* [npm](https://www.npmjs.com)
27+
* [Yarn](https://yarnpkg.com)
3728

3829
Note that it is often easiest to install Ember addon dependencies using the
3930
`ember install` command, which will save all dependencies to the correct
@@ -49,8 +40,8 @@ root (not the default `ember-cli-build.js`).
4940

5041
To add an asset specify the dependency in your`ember-cli-build.js` before
5142
calling `app.toTree()`. You can only import assets that are within the
52-
`bower_components` or `vendor`
53-
directories. The following example scenarios illustrate how this works.
43+
`node_modules` or `vendor` directories. The following example scenarios illustrate
44+
how this works.
5445

5546
#### Javascript Assets
5647

@@ -404,4 +395,4 @@ module.exports = function(defaults) {
404395
};
405396
```
406397

407-
_Note: [broccoli-static-compiler](https://github.com/joliss/broccoli-static-compiler) is deprecated. Use [broccoli-funnel](https://github.com/broccolijs/broccoli-funnel) instead._
398+
_Note: [broccoli-static-compiler](https://github.com/joliss/broccoli-static-compiler) is deprecated. Use [broccoli-funnel](https://github.com/broccolijs/broccoli-funnel) instead._

0 commit comments

Comments
 (0)