Skip to content

Commit

Permalink
Subject: add the karma configuration to boilerplate-gulp
Browse files Browse the repository at this point in the history
What Happened:
- add the karma configuration to boilerplate-gulp
- update the jshint configuration
- refactor the src folder structure
  • Loading branch information
ziscloud committed Sep 25, 2014
1 parent a7d42f8 commit 060cf56
Show file tree
Hide file tree
Showing 9 changed files with 59 additions and 58 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ lib-cov
# Coverage directory used by tools like istanbul
coverage

# Generated reports (testing, coverage, complexity)
# Generated directory (testing, coverage, complexity)
reports
build

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release
Expand Down
3 changes: 2 additions & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@
"tests"
],
"dependencies": {
"angular": "~1.2"
"angular": "~1.2",
"footable": "~2.0.0"
},
"devDependencies": {
"angular-mocks": "~1.2",
Expand Down
19 changes: 19 additions & 0 deletions dist/angular-footable.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions dist/angular-footable.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions dist/angular-footable.min.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ var gulp = require('gulp'),

boilerplate(gulp, {
pkg: require('./package.json'),
jsMain: './src/angular-footable.js'
});
jsMain: './src/angular-footable.js',
karmaConfig: require('./test/karma.conf.js')
});
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@
"homepage": "https://github.com/ziscloud/angular-footable",
"devDependencies": {
"gulp": "~3.8.0",
"boilerplate-gulp": "~0.2.0"
"boilerplate-gulp": "~0.3.0"
}
}
51 changes: 29 additions & 22 deletions test/karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
module.exports = function (config) {
config.set({
basePath: '../',
module.exports = {
browsers: ['PhantomJS'],
frameworks: ['jasmine'],

frameworks: [ 'jasmine' ],
preprocessors: {
'src/**/!(*Spec).js': ['coverage'],
'src/**/*.js': ['commonjs']
},

files: [
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'src/angular-footable.js',
'src/**/*.spec.js',
'test/main.js'
],
files: [
'bower_components/jquery/dist/jquery.js',
'bower_components/angular/angular.js',
'bower_components/angular-mocks/angular-mocks.js',
'src/angular-footable.js'
],

reporters: [ 'dots' ],
colors: true,
logLevel: config.LOG_INFO,

port: 9876,
autoWatch: false,
reporters: ['coverage', 'junit', 'progress'],


browsers: [ 'PhantomJS' ],
singleRun: true
});
};
junitReporter: {
outputFile: 'reports/test/unit/junit/test-results.xml',
suite: ''
},

coverageReporter: {
reporters: [
{ type: 'html', dir: 'reports/test/unit/coverage' },
{ type: 'lcovonly', dir: 'reports/test/unit/coverage' },
{ type: 'json', dir: 'reports/test/unit/coverage' },
{ type: 'cobertura', dir: 'reports/test/unit/coverage' }
]
}
};
31 changes: 0 additions & 31 deletions test/main.js

This file was deleted.

0 comments on commit 060cf56

Please sign in to comment.