Skip to content

Commit

Permalink
version 1.1.0 -- less code
Browse files Browse the repository at this point in the history
  • Loading branch information
SilentCicero committed Feb 2, 2017
1 parent 0176fb8 commit 9f3c2e1
Show file tree
Hide file tree
Showing 8 changed files with 33 additions and 29 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.1.0 -- remove ipfs-api

1. Remove ipfs-api requirement.. Yay.. thanks pelle!

# 1.0.0 -- ipfsjs

1. Basic testing
Expand Down
32 changes: 17 additions & 15 deletions dist/ipfs-mini.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/ipfs-mini.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/ipfs-mini.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ipfs-mini",
"version": "1.0.1",
"version": "1.1.0",
"description": "A super tiny module for querying an IPFS node that works in nodejs and the browser.",
"main": "lib/index.js",
"files": [
Expand Down Expand Up @@ -177,7 +177,8 @@
"webpack": "2.1.0-beta.15"
},
"browser": {
"xmlhttprequest": false
"xmlhttprequest": false,
"./src/lib/XMLHttpRequest.js": "./src/lib/XMLHttpRequest-browser.js"
},
"dependencies": {
"xmlhttprequest": "^1.8.0"
Expand Down
11 changes: 1 addition & 10 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
let XMLHttpRequest; // eslint-disable-line

// browser
if (typeof window !== 'undefined' && window.XMLHttpRequest) {
XMLHttpRequest = window.XMLHttpRequest; // eslint-disable-line

// node
} else {
XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest; // eslint-disable-line
}
const XMLHttpRequest = require('./lib/XMLHttpRequest');

module.exports = IPFS;

Expand Down
3 changes: 3 additions & 0 deletions src/lib/XMLHttpRequest-browser.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const XMLHttpRequest = window.XMLHttpRequest; // eslint-disable-line

module.exports = XMLHttpRequest;
3 changes: 3 additions & 0 deletions src/lib/XMLHttpRequest.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;

module.exports = XMLHttpRequest;

0 comments on commit 9f3c2e1

Please sign in to comment.