Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #124 from juliangruber/master

adapted to new component spec
  • Loading branch information...
commit e214ee1596247f6f0074baaf215c034148b1cf50 2 parents 6e3fed4 + 5fb598f
@tj tj authored
Showing with 14 additions and 6 deletions.
  1. +2 −0  .gitignore
  2. +5 −2 component.json
  3. +7 −4 index.js
View
2  .gitignore
@@ -4,3 +4,5 @@ coverage.html
node_modules
*.sock
test.js
+build
+components
View
7 component.json
@@ -4,5 +4,8 @@
"description": "awesome http requests",
"version": "0.9.4",
"keywords": ["http", "ajax", "request", "agent"],
- "main": "lib/superagent.js"
-}
+ "scripts": ["index.js", "lib/superagent.js"],
+ "dependencies": {
+ "component/emitter": "0.0.6"
+ }
+}
View
11 index.js
@@ -1,4 +1,7 @@
-
-module.exports = process.env.SUPERAGENT_COV
- ? require('./lib-cov/node')
- : require('./lib/node');
+if (typeof window != 'undefined') {
+ module.exports = require('./lib/superagent');
+} else if (process.env.SUPERAGENT_COV) {
+ module.exports = require('./lib-cov/node');
+} else {
+ module.exports = require('./lib/node');
+}
Please sign in to comment.
Something went wrong with that request. Please try again.