Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

chore(*): several updates #341

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 17 additions & 6 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@
{
"globalstrict": true,
"strict": "global",
"globals": {
// Angular
"angular": false,

// Angular mocks
"module": false,
"inject": false,

// Jasmine
"jasmine": false,
"describe": false,
"it": false,
"expect": false,
"beforeEach": false,
"afterEach": false,
"module": false,
"inject": false
"it": false,
"expect": false,

// Protractor
"browser": false,
"element": false,
"by": false
}
}
}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- "0.10"
- '4.4'

before_script:
- export DISPLAY=:99.0
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ this server is:
npm start
```

Now browse to the app at `http://localhost:8000/app/index.html`.
Now browse to the app at `http://localhost:8000/index.html`.



Expand Down
4 changes: 3 additions & 1 deletion app/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ angular.module('myApp', [
'myApp.view2',
'myApp.version'
]).
config(['$routeProvider', function($routeProvider) {
config(['$locationProvider', '$routeProvider', function($locationProvider, $routeProvider) {
$locationProvider.hashPrefix('!');

$routeProvider.otherwise({redirectTo: '/view1'});
}]);
4 changes: 2 additions & 2 deletions app/index-async.html
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
</head>
<body ng-cloak>
<ul class="menu">
<li><a href="#/view1">view1</a></li>
<li><a href="#/view2">view2</a></li>
<li><a href="#!/view1">view1</a></li>
<li><a href="#!/view2">view2</a></li>
</ul>

<div ng-view></div>
Expand Down
4 changes: 2 additions & 2 deletions app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
</head>
<body>
<ul class="menu">
<li><a href="#/view1">view1</a></li>
<li><a href="#/view2">view2</a></li>
<li><a href="#!/view1">view1</a></li>
<li><a href="#!/view2">view2</a></li>
</ul>

<!--[if lt IE 7]>
Expand Down
10 changes: 5 additions & 5 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"license": "MIT",
"private": true,
"dependencies": {
"angular": "~1.4.0",
"angular-route": "~1.4.0",
"angular-loader": "~1.4.0",
"angular-mocks": "~1.4.0",
"html5-boilerplate": "~5.2.0"
"angular": "~1.5.0",
"angular-route": "~1.5.0",
"angular-loader": "~1.5.0",
"angular-mocks": "~1.5.0",
"html5-boilerplate": "^5.3.0"
}
}
5 changes: 4 additions & 1 deletion e2e-tests/protractor.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
//jshint strict: false
exports.config = {

allScriptsTimeout: 11000,

specs: [
Expand All @@ -9,11 +11,12 @@ exports.config = {
'browserName': 'chrome'
},

baseUrl: 'http://localhost:8000/app/',
baseUrl: 'http://localhost:8000/',

framework: 'jasmine',

jasmineNodeOpts: {
defaultTimeoutInterval: 30000
}

};
4 changes: 2 additions & 2 deletions e2e-tests/scenarios.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ describe('my app', function() {
describe('view1', function() {

beforeEach(function() {
browser.get('index.html#/view1');
browser.get('index.html#!/view1');
});


Expand All @@ -29,7 +29,7 @@ describe('my app', function() {
describe('view2', function() {

beforeEach(function() {
browser.get('index.html#/view2');
browser.get('index.html#!/view2');
});


Expand Down
35 changes: 18 additions & 17 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,31 @@
module.exports = function(config){
//jshint strict: false
module.exports = function(config) {
config.set({

basePath : './',
basePath: './app',

files : [
'app/bower_components/angular/angular.js',
'app/bower_components/angular-route/angular-route.js',
'app/bower_components/angular-mocks/angular-mocks.js',
'app/components/**/*.js',
'app/view*/**/*.js'
files: [
'bower_components/angular/angular.js',
'bower_components/angular-route/angular-route.js',
'bower_components/angular-mocks/angular-mocks.js',
'components/**/*.js',
'view*/**/*.js'
],

autoWatch : true,
autoWatch: true,

frameworks: ['jasmine'],

browsers : ['Chrome'],
browsers: ['Chrome'],

plugins : [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-junit-reporter'
],
plugins: [
'karma-chrome-launcher',
'karma-firefox-launcher',
'karma-jasmine',
'karma-junit-reporter'
],

junitReporter : {
junitReporter: {
outputFile: 'test_out/unit.xml',
suite: 'unit'
}
Expand Down
24 changes: 12 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,26 +6,26 @@
"repository": "https://github.com/angular/angular-seed",
"license": "MIT",
"devDependencies": {
"bower": "^1.3.1",
"http-server": "^0.6.1",
"jasmine-core": "^2.3.4",
"karma": "~0.12",
"karma-chrome-launcher": "^0.1.12",
"karma-firefox-launcher": "^0.1.6",
"karma-jasmine": "^0.3.5",
"karma-junit-reporter": "^0.2.2",
"protractor": "^2.1.0",
"shelljs": "^0.2.6"
"bower": "^1.7.7",
"http-server": "^0.9.0",
"jasmine-core": "^2.4.1",
"karma": "^0.13.22",
"karma-chrome-launcher": "^0.2.3",
"karma-firefox-launcher": "^0.1.7",
"karma-jasmine": "^0.3.8",
"karma-junit-reporter": "^0.4.1",
"protractor": "^3.2.2",
"shelljs": "^0.6.0"
},
"scripts": {
"postinstall": "bower install",

"prestart": "npm install",
"start": "http-server -a localhost -p 8000 -c-1",
"start": "http-server -a localhost -p 8000 -c-1 ./app",

"pretest": "npm install",
"test": "karma start karma.conf.js",
"test-single-run": "karma start karma.conf.js --single-run",
"test-single-run": "karma start karma.conf.js --single-run",

"preupdate-webdriver": "npm install",
"update-webdriver": "webdriver-manager update",
Expand Down