Skip to content

Commit

Permalink
Added karma integration, code coverage and updated README.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paolo Scanferla committed May 8, 2014
1 parent 070dda8 commit afa2229
Show file tree
Hide file tree
Showing 18 changed files with 11,627 additions and 5 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ platform without having to compromise on the front-end.

bower install asteroid

##Test

npm test

##Example

<span style="color:red;">Warning: the API is in flux and needs to be cleaned up. This is what using
Expand All @@ -26,13 +30,14 @@ Asteroid will look like in a couple of weeks.</span>
// Connect to a Meteor backend
var ceres = new Asteroid("localhost:3000");

// Use real-time collection
var tasks = ceres.createCollection("tasks");
// Use real-time collections
ceres.subscribe("tasks");
var tasks = ceres.getCollection("tasks");
tasks.insert({
description: "Do the laundry"
});
var laundryTask = tasks.find({description: "Do the laundry"});
var laundryTaskQuery = tasks.reactiveQuery({description: "Do the laundry"});
console.log(laundryTaskQuery.result); // Logs the array of results

// Login your user
ceres.loginWithTwitter();
Expand Down
12 changes: 10 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
"version": "0.2.1",
"description": "Aletrnative Meteor client",
"main": "dist/asteroid.js",
"scripts": {},
"scripts": {
"test": "karma start test/karma.conf.js"
},
"repository": {
"type": "git",
"url": "https://github.com/mondora/asteroid"
Expand All @@ -23,12 +25,18 @@
"blanket": "^1.1.6",
"gulp": "^3.5.6",
"gulp-concat": "^2.2.0",
"gulp-livereload": "^1.3.1",
"gulp-load-plugins": "^0.4.0",
"gulp-mocha": "^0.4.1",
"gulp-open": "^0.2.8",
"gulp-rename": "^1.2.0",
"gulp-uglify": "^0.2.1",
"gulp-livereload": "^1.3.1",
"karma": "^0.12.14",
"karma-chrome-launcher": "^0.1.3",
"karma-coverage": "^0.2.1",
"karma-firefox-launcher": "^0.1.3",
"karma-mocha": "^0.1.3",
"karma-safari-launcher": "^0.1.1",
"lodash": "^2.4.1",
"mocha": "^1.18.2",
"node-static": "^0.7.3",
Expand Down
Loading

0 comments on commit afa2229

Please sign in to comment.