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

Updated Karma & Fixed the CI build #94

Closed
wants to merge 6 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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
logs/*
!.gitkeep
libpeerconnection.log
node_modules/
.DS_Store
.idea/
15 changes: 15 additions & 0 deletions .jshintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"jquery": true,
"browser": true,
"globals": {
"describe":false,
"beforeEach":false,
"module":false,
"it":false,
"inject":false,
"expect":false,
"browser":false,
"element":false,
"angular":false
}
}
13 changes: 3 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
language: node_js
node_js:
- 0.8
- 0.11.5

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- npm install --quiet -g karma
- ./scripts/web-server.js > /dev/null &
- sleep 1 # give server time to start

script:
- karma start config/karma.conf.js --no-auto-watch --single-run --reporters=dots --browsers=Firefox
- karma start config/karma-e2e.conf.js --reporters=dots --browsers=Firefox
- npm install grunt-cli -g
script: grunt --verbose
47 changes: 47 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
module.exports = function (grunt) {

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
jshint: {
files: ['gruntfile.js', 'app/js/*.js', 'test/e2e/*.js', 'test/unit/*.js'],
options: {
// options here to override JSHint defaults
jshintrc: '.jshintrc'
}
},
karma: {
options: {
singleRun: true,
browsers: ['PhantomJS'],
reporters: 'dots'
},
e2e: {
configFile: 'config/karma-e2e.conf.js'
},
unit: {
configFile: 'config/karma.conf.js'
}
},
connect: {
server: {
options: {
port: 8000,
base: '.'
}
}
},
watch: {
files: ['gruntfile.js', 'app/js/*.js', 'test/**/*.js'],
tasks: ['jshint']
}
});

grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-contrib-connect');
grunt.registerTask('test', ['jshint', 'karma:unit', 'connect', 'karma:e2e']);
grunt.registerTask('default', ['jshint', 'karma:unit', 'connect', 'karma:e2e']);
grunt.registerTask('e2e', ['jshint', 'connect', 'karma:e2e']);

};
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,5 @@ fetch the changes and merge them into your project with git.
## Contact

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

[![Build Status](https://travis-ci.org/ferronrsmith/angular-seed.png?branch=master)](https://travis-ci.org/ferronrsmith/angular-seed)
2 changes: 0 additions & 2 deletions app/js/app.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';


// Declare app level module which depends on filters, and services
angular.module('myApp', ['myApp.filters', 'myApp.services', 'myApp.directives', 'myApp.controllers']).
Expand Down
2 changes: 0 additions & 2 deletions app/js/controllers.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

/* Controllers */

angular.module('myApp.controllers', []).
Expand Down
2 changes: 0 additions & 2 deletions app/js/directives.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

/* Directives */


Expand Down
4 changes: 1 addition & 3 deletions app/js/filters.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
'use strict';

/* Filters */

angular.module('myApp.filters', []).
filter('interpolate', ['version', function(version) {
return function(text) {
return String(text).replace(/\%VERSION\%/mg, version);
}
};
}]);
2 changes: 0 additions & 2 deletions app/js/services.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

/* Services */


Expand Down
Loading