Skip to content

Commit

Permalink
Merge pull request #2 from bcherny/coverage
Browse files Browse the repository at this point in the history
add coverage reporting
  • Loading branch information
bcherny committed Dec 22, 2014
2 parents 2f90e31 + b2b2a28 commit a3514a9
Show file tree
Hide file tree
Showing 7 changed files with 58 additions and 26 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Expand Up @@ -6,4 +6,5 @@ node_modules
_SpecRunner.html
Gruntfile.js
.grunt
test/test.js
test/test.js
reports
7 changes: 6 additions & 1 deletion .travis.yml
Expand Up @@ -4,4 +4,9 @@ node_js:
before_install:
- npm install -g bower
- npm install -g grunt-cli
- bower install
- bower install
before_script:
- npm test
- grunt coverage
script:
- grunt coveralls
41 changes: 38 additions & 3 deletions Gruntfile.coffee
Expand Up @@ -4,13 +4,15 @@ module.exports = (grunt) ->
'grunt-contrib-coffee'
'grunt-contrib-jasmine'
'grunt-contrib-watch'
'grunt-coveralls'
'grunt-ngmin'
]
.forEach grunt.loadNpmTasks

# task sets
build = ['ngmin']
test = ['coffee', 'jasmine']
test = ['coffee', 'jasmine:unit']
coverage = ['coffee', 'jasmine:coverage']

# task defs
grunt.initConfig
Expand All @@ -21,8 +23,40 @@ module.exports = (grunt) ->
files:
'test/test.js': 'test/test.coffee'

coveralls:
options:
force: true
main:
src: 'reports/lcov/lcov.info'

jasmine:
test:
coverage:
src: [
'./src/<%= pkg.name %>.js'
]
options:
specs: ['./test/test.js']
template: require 'grunt-template-jasmine-istanbul'
templateOptions:
coverage: 'reports/lcov/lcov.json'
report: [
{
type: 'html'
options:
dir: 'reports/html'
}
{
type: 'lcov'
options:
dir: 'reports/lcov'
}
]
type: 'lcovonly'
vendor: [
'./bower_components/angular/angular.js'
'./bower_components/angular-mocks/angular-mocks.js'
]
unit:
src: './src/<%= pkg.name %>.js'
options:
specs: './test/test.js'
Expand Down Expand Up @@ -52,4 +86,5 @@ module.exports = (grunt) ->
spawn: false

grunt.registerTask 'default', build
grunt.registerTask 'test', test
grunt.registerTask 'test', test
grunt.registerTask 'coverage', coverage
13 changes: 1 addition & 12 deletions LICENSE.md
Expand Up @@ -176,18 +176,7 @@

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright 2014 Turn Inc.
Copyright 2014 Boris Cherny.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
5 changes: 2 additions & 3 deletions README.md
@@ -1,11 +1,10 @@
angular-lock-column-widths [![Build Status](https://travis-ci.org/turn/angular-lock-column-widths.svg?branch=master)](https://travis-ci.org/turn/angular-lock-column-widths)
==========================
# angular-lock-column-widths [![Build Status](https://travis-ci.org/bcherny/angular-lock-column-widths.svg?branch=master)](https://travis-ci.org/bcherny/angular-lock-column-widths) [![Coverage Status](https://img.shields.io/coveralls/bcherny/angular-lock-column-widths.svg)](https://coveralls.io/r/bcherny/angular-lock-column-widths)

lock and unlock table column widths, to prevent resizing

## install

`bower install -S angular-lock-column-widths`
`bower install -S git@github.com:bcherny/angular-lock-column-widths.git`

## use

Expand Down
2 changes: 1 addition & 1 deletion bower.json
Expand Up @@ -20,7 +20,7 @@
"stuck"
],
"authors": [
"Boris Cherny <bcherny@turn.com>"
"Boris Cherny <boris@performancejs.com>"
],
"license": "Apache2",
"ignore": [
Expand Down
13 changes: 8 additions & 5 deletions package.json
Expand Up @@ -7,11 +7,12 @@
"test": "test"
},
"scripts": {
"test": "grunt test --verbose"
"test": "grunt test --verbose",
"pretest": "npm i"
},
"repository": {
"type": "git",
"url": "git+https://github.com/turn/angular-lock-column-widths.git"
"url": "git+https://github.com/bcherny/angular-lock-column-widths.git"
},
"keywords": [
"angular",
Expand All @@ -29,13 +30,15 @@
"prevent",
"stuck"
],
"author": "Boris Cherny <bcherny@turn.com>",
"author": "Boris Cherny <boris@performancejs.com>",
"license": "Apache2",
"devDependencies": {
"grunt": "^0.4.5",
"grunt-contrib-coffee": "^0.10.1",
"grunt-contrib-jasmine": "^0.6.4",
"grunt-contrib-jasmine": "^0.8.1",
"grunt-contrib-watch": "^0.6.1",
"grunt-ngmin": "0.0.3"
"grunt-coveralls": "^1.0.0",
"grunt-ngmin": "0.0.3",
"grunt-template-jasmine-istanbul": "^0.3.0"
}
}

0 comments on commit a3514a9

Please sign in to comment.