Skip to content

Commit fc3404d

Browse files
committed
Merge remote-tracking branch 'angular/master'
2 parents 97b839a + 8f1fb89 commit fc3404d

13 files changed

+101
-93
lines changed

.jshintrc

+17-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,24 @@
11
{
2-
"globalstrict": true,
2+
"strict": "global",
33
"globals": {
4+
// Angular
45
"angular": false,
6+
7+
// Angular mocks
8+
"module": false,
9+
"inject": false,
10+
11+
// Jasmine
12+
"jasmine": false,
513
"describe": false,
6-
"it": false,
7-
"expect": false,
814
"beforeEach": false,
915
"afterEach": false,
10-
"module": false,
11-
"inject": false
16+
"it": false,
17+
"expect": false,
18+
19+
// Protractor
20+
"browser": false,
21+
"element": false,
22+
"by": false
1223
}
13-
}
24+
}

.travis.yml

+14-7
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,21 @@
1+
sudo: required
2+
dist: trusty
3+
14
language: node_js
25
node_js:
3-
- "0.10"
6+
- '4.5'
47

5-
before_script:
8+
install:
69
- export DISPLAY=:99.0
710
- sh -e /etc/init.d/xvfb start
8-
- npm start > /dev/null &
9-
- npm run update-webdriver
10-
- sleep 1 # give server time to start
11+
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
12+
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
13+
- sudo apt-get update -q
14+
- sudo apt-get install -q google-chrome-stable
15+
16+
before_script:
17+
- npm install
1118

1219
script:
13-
- node_modules/.bin/karma start karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
14-
- node_modules/.bin/protractor e2e-tests/protractor.conf.js --browser=firefox
20+
- npm run test-single-run
21+
- (npm start > /dev/null &) && (npm run protractor)

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License
22

3-
Copyright (c) 2010-2014 Google, Inc. http://angularjs.org
3+
Copyright (c) 2010-2016 Google, Inc. http://angularjs.org
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+17-7
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ this server is:
7272
npm start
7373
```
7474

75-
Now browse to the app at `http://localhost:8000/app/index.html`.
75+
Now browse to the app at `http://localhost:8000/index.html`.
7676

7777

7878

@@ -108,7 +108,7 @@ e2e-tests/ --> end-to-end tests
108108

109109
## Testing
110110

111-
There are two kinds of tests in the angular-seed application: Unit tests and End to End tests.
111+
There are two kinds of tests in the angular-seed application: Unit tests and end-to-end tests.
112112

113113
### Running Unit Tests
114114

@@ -175,6 +175,13 @@ npm run protractor
175175
This script will execute the end-to-end tests against the application being hosted on the
176176
development server.
177177

178+
**Note:**
179+
Under the hood, Protractor uses the [Selenium Standalone Server][selenium], which in turn requires
180+
the [Java Development Kit (JDK)][jdk] to be installed on your local machine. Check this by running
181+
`java -version` from the command line.
182+
183+
If JDK is not already installed, you can download it [here][jdk-download].
184+
178185

179186
## Updating Angular
180187

@@ -286,12 +293,15 @@ along with a CI service (in Jenkins) hosted that will run unit and end to end te
286293

287294
For more information on AngularJS please check out http://angularjs.org/
288295

289-
[git]: http://git-scm.com/
290296
[bower]: http://bower.io
297+
[git]: http://git-scm.com/
298+
[http-server]: https://github.com/nodeapps/http-server
299+
[jasmine]: https://jasmine.github.io
300+
[jdk]: https://en.wikipedia.org/wiki/Java_Development_Kit
301+
[jdk-download]: http://www.oracle.com/technetwork/java/javase/downloads/index.html
302+
[karma]: https://karma-runner.github.io
303+
[node]: https://nodejs.org
291304
[npm]: https://www.npmjs.org/
292-
[node]: http://nodejs.org
293305
[protractor]: https://github.com/angular/protractor
294-
[jasmine]: http://jasmine.github.io
295-
[karma]: http://karma-runner.github.io
306+
[selenium]: http://docs.seleniumhq.org/
296307
[travis]: https://travis-ci.org/
297-
[http-server]: https://github.com/nodeapps/http-server

app/app.css

+1-6
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,7 @@
1919
display: inline;
2020
}
2121

22-
.menu > li:before {
22+
.menu > li + li:before {
2323
content: "|";
2424
padding-right: 0.3em;
2525
}
26-
27-
.menu > li:nth-child(1):before {
28-
content: "";
29-
padding: 0;
30-
}

app/app.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ angular.module('myApp', [
77
'myApp.view2',
88
'myApp.version'
99
]).
10-
config(['$routeProvider', function($routeProvider) {
10+
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
11+
$locationProvider.hashPrefix('!');
12+
1113
$routeProvider.otherwise({redirectTo: '/view1'});
1214
}]);

app/index-async.html

+5-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
<html lang="en">
33
<head>
44
<meta charset="utf-8">
5-
<link rel="stylesheet" href="bower_components/html5-boilerplate/css/normalize.css">
6-
<link rel="stylesheet" href="bower_components/html5-boilerplate/css/main.css">
5+
<link rel="stylesheet" href="bower_components/html5-boilerplate/dist/css/normalize.css">
6+
<link rel="stylesheet" href="bower_components/html5-boilerplate/dist/css/main.css">
77
<style>
88
[ng-cloak] {
99
display: none;
1010
}
1111
</style>
12-
<script src="bower_components/html5-boilerplate/js/vendor/modernizr-2.6.2.min.js"></script>
12+
<script src="bower_components/html5-boilerplate/dist/js/vendor/modernizr-2.8.3.min.js"></script>
1313
<script>
1414
// include angular loader, which allows the files to load in any order
1515
//@@NG_LOADER_START@@
@@ -46,8 +46,8 @@
4646
</head>
4747
<body ng-cloak>
4848
<ul class="menu">
49-
<li><a href="#/view1">view1</a></li>
50-
<li><a href="#/view2">view2</a></li>
49+
<li><a href="#!/view1">view1</a></li>
50+
<li><a href="#!/view2">view2</a></li>
5151
</ul>
5252

5353
<div ng-view></div>

app/index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
</head>
2424
<body>
2525
<ul class="menu">
26-
<li><a href="#/view1">view1</a></li>
27-
<li><a href="#/view2">view2</a></li>
26+
<li><a href="#!/view1">view1</a></li>
27+
<li><a href="#!/view2">view2</a></li>
2828
</ul>
2929

3030
<!--[if lt IE 7]>

bower.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"license": "MIT",
77
"private": true,
88
"dependencies": {
9-
"angular": "~1.4.0",
10-
"angular-route": "~1.4.0",
11-
"angular-loader": "~1.4.0",
12-
"angular-mocks": "~1.4.0",
13-
"html5-boilerplate": "~5.2.0"
9+
"angular": "~1.5.0",
10+
"angular-route": "~1.5.0",
11+
"angular-loader": "~1.5.0",
12+
"angular-mocks": "~1.5.0",
13+
"html5-boilerplate": "^5.3.0"
1414
}
1515
}

e2e-tests/protractor.conf.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
//jshint strict: false
12
exports.config = {
3+
24
allScriptsTimeout: 11000,
35

46
specs: [
@@ -9,11 +11,12 @@ exports.config = {
911
'browserName': 'chrome'
1012
},
1113

12-
baseUrl: 'http://localhost:8000/app/',
14+
baseUrl: 'http://localhost:8000/',
1315

1416
framework: 'jasmine',
1517

1618
jasmineNodeOpts: {
1719
defaultTimeoutInterval: 30000
1820
}
21+
1922
};

e2e-tests/scenarios.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ describe('my app', function() {
1414
describe('view1', function() {
1515

1616
beforeEach(function() {
17-
browser.get('index.html#/view1');
17+
browser.get('index.html#!/view1');
1818
});
1919

2020

@@ -29,7 +29,7 @@ describe('my app', function() {
2929
describe('view2', function() {
3030

3131
beforeEach(function() {
32-
browser.get('index.html#/view2');
32+
browser.get('index.html#!/view2');
3333
});
3434

3535

karma.conf.js

+18-17
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,31 @@
1-
module.exports = function(config){
1+
//jshint strict: false
2+
module.exports = function(config) {
23
config.set({
34

4-
basePath : './',
5+
basePath: './app',
56

6-
files : [
7-
'app/bower_components/angular/angular.js',
8-
'app/bower_components/angular-route/angular-route.js',
9-
'app/bower_components/angular-mocks/angular-mocks.js',
10-
'app/components/**/*.js',
11-
'app/view*/**/*.js'
7+
files: [
8+
'bower_components/angular/angular.js',
9+
'bower_components/angular-route/angular-route.js',
10+
'bower_components/angular-mocks/angular-mocks.js',
11+
'components/**/*.js',
12+
'view*/**/*.js'
1213
],
1314

14-
autoWatch : true,
15+
autoWatch: true,
1516

1617
frameworks: ['jasmine'],
1718

18-
browsers : ['Chrome'],
19+
browsers: ['Chrome'],
1920

20-
plugins : [
21-
'karma-chrome-launcher',
22-
'karma-firefox-launcher',
23-
'karma-jasmine',
24-
'karma-junit-reporter'
25-
],
21+
plugins: [
22+
'karma-chrome-launcher',
23+
'karma-firefox-launcher',
24+
'karma-jasmine',
25+
'karma-junit-reporter'
26+
],
2627

27-
junitReporter : {
28+
junitReporter: {
2829
outputFile: 'test_out/unit.xml',
2930
suite: 'unit'
3031
}

package.json

+12-33
Original file line numberDiff line numberDiff line change
@@ -4,55 +4,34 @@
44
"version": "0.0.0",
55
"description": "A starter project for AngularJS",
66
"repository": "https://github.com/angular/angular-seed",
7-
<<<<<<< HEAD
8-
"version": "1.0.0",
9-
"devDependencies": {
10-
"grunt": "~0.4.5",
11-
"grunt-contrib-concat": "~0.5.1",
12-
"grunt-contrib-uglify": "~0.9.1",
13-
"grunt-contrib-cssmin": "~0.12.2",
14-
"grunt-usemin": "~3.0.0",
15-
"grunt-contrib-copy": "~0.8.0",
16-
"grunt-rev": "~0.1.0",
17-
"grunt-contrib-clean": "~0.6.0",
18-
"load-grunt-tasks": "3.1.0",
19-
"karma": "~0.12",
20-
"karma-junit-reporter": "~0.2.2",
21-
"karma-jasmine": "~0.3.5",
22-
"karma-ng-scenario": "~0.1",
23-
"phantomjs": "~1.9.16",
24-
"protractor": "~2.0.0"
25-
=======
267
"license": "MIT",
278
"devDependencies": {
28-
"bower": "^1.3.1",
29-
"http-server": "^0.6.1",
30-
"jasmine-core": "^2.3.4",
31-
"karma": "~0.12",
32-
"karma-chrome-launcher": "^0.1.12",
33-
"karma-firefox-launcher": "^0.1.6",
34-
"karma-jasmine": "^0.3.5",
35-
"karma-junit-reporter": "^0.2.2",
36-
"protractor": "^2.1.0",
37-
"shelljs": "^0.2.6"
9+
"bower": "^1.7.7",
10+
"http-server": "^0.9.0",
11+
"jasmine-core": "^2.4.1",
12+
"karma": "^0.13.22",
13+
"karma-chrome-launcher": "^0.2.3",
14+
"karma-firefox-launcher": "^0.1.7",
15+
"karma-jasmine": "^0.3.8",
16+
"karma-junit-reporter": "^0.4.1",
17+
"protractor": "^3.2.2"
3818
},
3919
"scripts": {
4020
"postinstall": "bower install",
4121

4222
"prestart": "npm install",
43-
"start": "http-server -a localhost -p 8000 -c-1",
23+
"start": "http-server -a localhost -p 8000 -c-1 ./app",
4424

4525
"pretest": "npm install",
4626
"test": "karma start karma.conf.js",
47-
"test-single-run": "karma start karma.conf.js --single-run",
27+
"test-single-run": "karma start karma.conf.js --single-run",
4828

4929
"preupdate-webdriver": "npm install",
5030
"update-webdriver": "webdriver-manager update",
5131

5232
"preprotractor": "npm run update-webdriver",
5333
"protractor": "protractor e2e-tests/protractor.conf.js",
5434

55-
"update-index-async": "node -e \"require('shelljs/global'); sed('-i', /\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/, '//@@NG_LOADER_START@@\\n' + sed(/sourceMappingURL=angular-loader.min.js.map/,'sourceMappingURL=bower_components/angular-loader/angular-loader.min.js.map','app/bower_components/angular-loader/angular-loader.min.js') + '\\n//@@NG_LOADER_END@@', 'app/index-async.html');\""
56-
>>>>>>> angular/master
35+
"update-index-async": "node -e \"var fs=require('fs'),indexFile='app/index-async.html',loaderFile='app/bower_components/angular-loader/angular-loader.min.js',loaderText=fs.readFileSync(loaderFile,'utf-8').split(/sourceMappingURL=angular-loader.min.js.map/).join('sourceMappingURL=bower_components/angular-loader/angular-loader.min.js.map'),indexText=fs.readFileSync(indexFile,'utf-8').split(/\\/\\/@@NG_LOADER_START@@[\\s\\S]*\\/\\/@@NG_LOADER_END@@/).join('//@@NG_LOADER_START@@\\n'+loaderText+' //@@NG_LOADER_END@@');fs.writeFileSync(indexFile,indexText);\""
5736
}
5837
}

0 commit comments

Comments
 (0)