Skip to content
This repository has been archived by the owner on Jul 29, 2019. It is now read-only.

Commit

Permalink
Adds code-cov to develop and updates readme. (#3629)
Browse files Browse the repository at this point in the history
  • Loading branch information
macleodbroad-wf authored and yotamberk committed Oct 30, 2017
1 parent bd668c5 commit 95657e9
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 17 deletions.
10 changes: 9 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,17 @@ addons:
packages:
- libgif-dev
- g++-4.8
code_climate:
repo_token: 07de009e5f4d0a43c51b18f3443b2fe7ddcf3fea206e75c3a81b1c4030657f69
cache:
directories:
- node_modules
before_script:
- npm run lint
- npm install gulp
script:
- gulp
- npm test
- npm run-script test-cov
after_script:
- npm install -g codeclimate-test-reporter
- codeclimate-test-reporter < ./coverage/lcov.info
36 changes: 21 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
vis.js
==================
# vis.js

[![Join the chat at https://gitter.im/vis-js/Lobby](https://badges.gitter.im/vis-js/Lobby.svg)](https://gitter.im/vis-js/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

<a href="https://github.com/almende/vis/blob/develop/misc/we_need_help.md">
<img align="right" src="https://raw.githubusercontent.com/almende/vis/master/misc/we_need_help.png">
Expand All @@ -21,6 +22,24 @@ The library consists of the following components:

The vis.js library was initially developed by [Almende B.V](http://almende.com).

## Badges

[![NPM](https://nodei.co/npm/vis.png?downloads=true&downloadRank=true)](https://nodei.co/npm/vis/)

[![Dependency Status](https://david-dm.org/almende/vis/status.svg)](https://david-dm.org/almende/vis)
[![devDependency Status](https://david-dm.org/almende/vis/dev-status.svg)](https://david-dm.org/almende/vis?type=dev)

[![last version on CDNJS](https://img.shields.io/cdnjs/v/vis.svg)](https://cdnjs.com/libraries/vis)
[![GitHub contributors](https://img.shields.io/github/contributors/almende/vis.svg)](https://github.com/almende/vis/graphs/contributors)
[![GitHub stars](https://img.shields.io/github/stars/almende/vis.svg)](https://github.com/almende/vis/stargazers)

[![GitHub issues](https://img.shields.io/github/issues/almende/vis.svg)](https://github.com/almende/vis/issues)
[![Percentage of issues still open](http://isitmaintained.com/badge/open/almende/vis.svg)](http://isitmaintained.com/project/almende/vis "Percentage of issues still open")
[![Average time to resolve an issue](http://isitmaintained.com/badge/resolution/almende/vis.svg)](http://isitmaintained.com/project/almende/vis "Average time to resolve an issue")
[![Pending Pull-Requests](http://githubbadges.herokuapp.com/almende/vis/pulls.svg)](https://github.com/almende/vis/pulls)

[![Code Climate](https://codeclimate.com/github/almende/vis/badges/gpa.svg)](https://codeclimate.com/github/almende/vis)

## Install

Install via npm:
Expand All @@ -36,16 +55,6 @@ Link via cdnjs: http://cdnjs.com
Or download the library from the github project:
[https://github.com/almende/vis.git](https://github.com/almende/vis.git).


### Installing module `canvas`

Module `canvas` is only required if you need to run `vis.js` on `node.js` and require actual output. It is not required for regular usage in a browser.

Currently, the unit tests use a mock object for canvas which has limited but adequate functionality. If `canvas` is installed, that will be used silently in place of the mock object.

The issue with `canvas` is that it has an external dependency to `cairo`. This needs to be installed outside of the regular install as done by `npm`. Please consult [`node-canvas` github page](https://github.com/Automattic/node-canvas/wiki#desktop) for the correct installation procecure your platform


## Load

To use a component, include the javascript and css files of vis in your web page:
Expand Down Expand Up @@ -332,9 +341,6 @@ module: {

There is also an [demo-project](https://github.com/mojoaxel/vis-webpack-demo) showing the integration of vis.js using webpack.




## Test

To test the library, install the project dependencies once:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"main": "./dist/vis.js",
"scripts": {
"test": "nyc mocha --compilers js:babel-core/register",
"test-cov": "nyc --reporter=html mocha --compilers js:babel-core/register",
"test-cov": "nyc --reporter=lcov mocha --compilers js:babel-core/register",
"build": "gulp",
"lint": "gulp lint",
"watch": "gulp watch",
Expand Down

0 comments on commit 95657e9

Please sign in to comment.