Skip to content

Commit 79f9cc9

Browse files
committed
chore: switch from bower to npm for front end dependencies
Related: angular/angular-seed#444
1 parent c17deea commit 79f9cc9

File tree

8 files changed

+486
-47
lines changed

8 files changed

+486
-47
lines changed

.bowerrc

-4
This file was deleted.

.gitignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
logs/*
22
!.gitkeep
33
node_modules/
4+
app/lib/
45
tmp
5-
.idea
66
.DS_Store
7+
.idea
78
angular-phonecat-snapshots
8-
bower_components/

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -173,19 +173,22 @@ The following docs describe how you can test and develop this application furthe
173173

174174
### Installing Dependencies
175175

176-
The application relies upon various Node.js tools, such as [Bower][bower], [Karma][karma] and
177-
[Protractor][protractor]. You can install these by running:
176+
The application relies upon various JS libraries, such as AngularJS and jQuery, and Node.js tools,
177+
such as [Karma][karma] and [Protractor][protractor]. You can install these by running:
178178

179179
```
180180
npm install
181181
```
182182

183-
This will also run Bower, which will download the Angular files needed for the current step of the
184-
tutorial.
183+
This will also download the AngularJS files needed for the current step of the tutorial and copy
184+
them to `app/lib`.
185185

186186
Most of the scripts described below will run this automatically but it doesn't do any harm to run
187187
it whenever you like.
188188

189+
*Note copying the AngularJS files from `node_modules` to `app/lib` makes it easier to serve the
190+
files by a web server.*
191+
189192
### Running the Application during Development
190193

191194
- Run `npm start`.
@@ -228,7 +231,7 @@ If JDK is not already installed, you can download it [here][jdk-download].
228231

229232
```
230233
app/ --> all the source code of the app (along with unit tests)
231-
bower_components/... --> 3rd party JS/CSS libraries, including Angular and jQuery
234+
lib/... --> 3rd party JS/CSS libraries, including AngularJS and jQuery (copied over from `node_modules/`)
232235
core/ --> all the source code of the core module (stuff used throughout the app)
233236
checkmark/... --> files for the `checkmark` filter, including JS source code, specs
234237
phone/... --> files for the `core.phone` submodule, including JS source code, specs
@@ -248,26 +251,23 @@ e2e-tests/ --> config and source files for e2e tests
248251
protractor.conf.js --> config file for running e2e tests with Protractor
249252
scenarios.js --> e2e specs
250253
251-
node_modules/... --> development tools (fetched using `npm`)
254+
node_modules/... --> 3rd party libraries and development tools (fetched using `npm`)
252255
253256
scripts/ --> handy scripts
254257
private/... --> private scripts used by the AngularJS Team to maintain this repo
255258
update-repo.sh --> script for pulling down the latest version of this repo (!!! DELETES ALL CHANGES YOU HAVE MADE !!!)
256259
257-
bower.json --> Bower specific metadata, including client-side dependencies
258260
karma.conf.js --> config file for running unit tests with Karma
259261
package.json --> Node.js specific metadata, including development tools dependencies
260262
package-lock.json --> Npm specific metadata, including versions of installed development tools dependencies
261263
```
262264

263-
264265
## Contact
265266

266267
For more information on AngularJS, please check out https://angularjs.org/.
267268

268269

269270
[angular-seed]: https://github.com/angular/angular-seed
270-
[bower]: http://bower.io/
271271
[git-home]: https://git-scm.com/
272272
[git-setup]: https://help.github.com/articles/set-up-git
273273
[google-phone-gallery]: http://web.archive.org/web/20131215082038/http://www.android.com/devices

app/index.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<head>
44
<meta charset="utf-8">
55
<title>My HTML File</title>
6-
<link rel="stylesheet" href="bower_components/bootstrap/dist/css/bootstrap.css" />
6+
<link rel="stylesheet" href="lib/bootstrap/dist/css/bootstrap.css" />
77
</head>
88
<body>
99
<!-- CONTENT -->

bower.json

-13
This file was deleted.

karma.conf.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ module.exports = function(config) {
55
basePath: './app',
66

77
files: [
8-
'bower_components/angular/angular.js',
9-
'bower_components/angular-mocks/angular-mocks.js',
8+
'lib/angular/angular.js',
9+
'../node_modules/angular-mocks/angular-mocks.js',
1010
'**/*.module.js',
1111
'*!(.module|.spec).js',
12-
'!(bower_components)/**/*!(.module|.spec).js',
12+
'!(lib)/**/*!(.module|.spec).js',
1313
'**/*.spec.js'
1414
],
1515

0 commit comments

Comments
 (0)