Skip to content

Commit 7a8a48c

Browse files
committed
tried to add coveralls
1 parent 4f92c27 commit 7a8a48c

5 files changed

Lines changed: 48 additions & 31 deletions

File tree

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ node_js:
33
- "0.12"
44
- "0.10"
55
- "iojs"
6-
before_install: npm install -g grunt-cli
6+
before_install: npm install -g grunt-cli istanbul

Gruntfile.js

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,30 @@ module.exports = function(grunt) {
2626
},
2727
all: ['test/*.js'],
2828
perf: ['test/performance.js']
29-
}
29+
},
30+
exec: {
31+
cover: "istanbul cover nodeunit test/"
32+
},
33+
coveralls: {
34+
options: {
35+
// LCOV coverage file relevant to every target
36+
src: 'coverage/lcov.info',
37+
force: false
38+
}
39+
}
3040
});
3141

3242
grunt.loadNpmTasks("grunt-ts");
3343
grunt.loadNpmTasks('grunt-contrib-nodeunit');
44+
grunt.loadNpmTasks('grunt-coveralls');
45+
grunt.loadNpmTasks('grunt-exec');
3446

3547
grunt.registerTask("publish", "Publish to npm", function() {
3648
require("./publish.js");
3749
});
3850
grunt.registerTask("default", ["ts:buildlocal"]);
3951
grunt.registerTask("build", ["ts:builddist"]);
52+
grunt.registerTask("cover", ["ts:buildlocal", "exec:cover", "coveralls"]);
4053
grunt.registerTask("test", ["ts:buildlocal","ts:buildtypescripttest", "nodeunit:all"]);
4154
grunt.registerTask("perf", ["ts:buildlocal", "nodeunit:perf"]);
4255

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# MOBservable
22

3+
[![Build Status](https://travis-ci.org/mweststrate/MOBservable.svg?branch=master)](https://travis-ci.org/mweststrate/MOBservable)
34
[![Build Status](https://travis-ci.org/mweststrate/MOBservable.svg?branch=development)](https://travis-ci.org/mweststrate/MOBservable)
4-
5+
[![Coverage Status](https://coveralls.io/repos/mweststrate/MOBservable/badge.svg)](https://coveralls.io/r/mweststrate/MOBservable)
56
*Changes are coming!*
67

78
MOBservable is light-weight stand alone observable implementation, based on the ideas of observables in bigger frameworks like `knockout`, `ember`, but this time without 'strings attached'. MOBservables allows you to observe primitive values, references, functions and arrays both synchronously and asynchronously!

mobservable.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,8 +745,10 @@ class DNode {
745745
private bindDependencies() {
746746
this.observing = DNode.trackingStack.pop();
747747

748+
/* TODO:
748749
if (this.isComputed && this.observing.length === 0 && !this.isDisposed)
749-
warn("You have created a function that doesn't observe any values, did you forget to make its dependencies observable?");
750+
this.log("You have created a function that doesn't observe any values, did you forget to make its dependencies observable?");
751+
*/
750752

751753
var changes = quickDiff(this.observing, this.prevObserving);
752754
var added = changes[0];

package.json

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
{
2-
"name": "mobservable",
3-
"version": "0.2.4",
4-
"description": "Changes are coming! Small library for creating observable properties en functions",
5-
"main": "dist/mobservable.js",
6-
"scripts": {
7-
"test": "grunt test",
8-
"prepublish": "grunt build"
9-
},
10-
"repository": {
11-
"type": "git",
12-
"url": "https://github.com/mweststrate/mobservable.git"
13-
},
14-
"author": "Michel Weststrate",
15-
"license": "MIT",
16-
"bugs": {
17-
"url": "https://github.com/mweststrate/mobservable/issues"
18-
},
19-
"homepage": "https://github.com/mweststrate/mobservable",
20-
"devDependencies": {
21-
"grunt": "^0.4.5",
22-
"grunt-contrib-nodeunit": "^0.4.1",
23-
"grunt-coveralls": "^1.0.0",
24-
"grunt-ts": "^4.0.1",
25-
"nscript": "^0.1.5",
26-
"typescript": "^1.5.0-alpha"
27-
}
28-
}
2+
"name": "mobservable",
3+
"version": "0.2.4",
4+
"description": "Changes are coming! Small library for creating observable properties en functions",
5+
"main": "dist/mobservable.js",
6+
"scripts": {
7+
"test": "grunt test",
8+
"prepublish": "grunt build"
9+
},
10+
"repository": {
11+
"type": "git",
12+
"url": "https://github.com/mweststrate/mobservable.git"
13+
},
14+
"author": "Michel Weststrate",
15+
"license": "MIT",
16+
"bugs": {
17+
"url": "https://github.com/mweststrate/mobservable/issues"
18+
},
19+
"homepage": "https://github.com/mweststrate/mobservable",
20+
"devDependencies": {
21+
"grunt": "^0.4.5",
22+
"grunt-contrib-nodeunit": "^0.4.1",
23+
"grunt-coveralls": "^1.0.0",
24+
"grunt-exec": "^0.4.6",
25+
"grunt-ts": "^4.0.1",
26+
"nscript": "^0.1.5",
27+
"typescript": "^1.5.0-alpha"
28+
}
29+
}

0 commit comments

Comments
 (0)