Skip to content

Commit 6867524

Browse files
author
Gaetan Renaudeau
committed
Improve README, build min and doc, v0.1.3
1 parent 4c474f6 commit 6867524

File tree

5 files changed

+96
-26
lines changed

5 files changed

+96
-26
lines changed

README.md

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,10 @@ bower install qajax
1818

1919
Also available on [NPM](https://npmjs.org/package/qajax).
2020

21-
Tests
21+
Links
2222
---
2323

24-
The library is stress-tested with `qunit` and a mock node.js server which test different edge-cases like different HTTP code, method, server lag,...
25-
26-
[![SauceLabs Status](https://saucelabs.com/browser-matrix/qajax.svg)](https://saucelabs.com/u/qajax)
24+
[Checkout the Annotated Source Code](http://greweb.me/qajax/docs/qajax.html)
2725

2826
Usages and explanations
2927
---
@@ -34,6 +32,17 @@ Usages and explanations
3432

3533
The `Qajax` function **just** returns a successful **Promise of XHR** when the server has returned a result - whatever the `status` code is.
3634

35+
36+
There are 3 possible signatures:
37+
38+
```javascript
39+
Qajax(url: String) => Promise[XHR]
40+
Qajax(options: Object) => Promise[XHR]
41+
Qajax(url: String, options: Object) => Promise[XHR]
42+
```
43+
44+
Simple usage:
45+
3746
```javascript
3847
var promiseOfXHR = Qajax("/all.json");
3948
// short version of: Qajax({ url: "/all.json", method: "GET" });
@@ -115,7 +124,7 @@ More advanced features
115124
* Qajax has a **timeout**:
116125

117126
```javascript
118-
var p = Qajax({ url: "/", timeout: 5000 });
127+
var p = Qajax("/", { timeout: 5000 });
119128
// p will be rejected if the server is not responding in 5 seconds.
120129
```
121130

@@ -148,5 +157,36 @@ function getResults (query) {
148157
*/
149158
```
150159

151-
[Checkout the Annotated Source Code](http://greweb.me/qajax/docs/qajax.html)
160+
Tests
161+
---
162+
163+
The library is stress-tested with `qunit` and a mock node.js server which test different edge-cases like different HTTP code, method, server lag,...
164+
165+
[![SauceLabs Status](https://saucelabs.com/browser-matrix/qajax.svg)](https://saucelabs.com/u/qajax)
166+
167+
Test locally: `grunt test-local` and go to `http://localhost:9999/test/`.
168+
169+
Development
170+
---
171+
172+
Install dev deps with ```npm install```.
173+
Then run ```grunt```.
174+
175+
Release Note
176+
---
177+
178+
0.1.3
179+
180+
* Add new signature `Qajax(url, settings)` + validation
181+
182+
0.1.2
183+
184+
* Using require('q') properly
185+
186+
0.1.1
187+
188+
* Fix CommonJS compatibility
189+
190+
0.1.0
152191

192+
* Initial release with Qajax, filterStatus, filterSuccess, toJSON, getJSON, serialize

build/qajax.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)