Skip to content

Commit

Permalink
Export to d3.
Browse files Browse the repository at this point in the history
Related d3/d3#2840.
  • Loading branch information
mbostock committed Jun 8, 2016
1 parent 6e0fab0 commit 17b57dc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
12 changes: 6 additions & 6 deletions README.md
Expand Up @@ -31,16 +31,16 @@ This module has built-in support for parsing [JSON](#json), [CSV](#csv) and [TSV

## Installing

If you use NPM, `npm install d3-request`. Otherwise, download the [latest release](https://github.com/d3/d3-request/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-request.v0.4.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3_request` global is exported:
If you use NPM, `npm install d3-request`. Otherwise, download the [latest release](https://github.com/d3/d3-request/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-request.v0.5.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported:

```html
<script src="https://d3js.org/d3-collection.v0.2.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v0.4.min.js"></script>
<script src="https://d3js.org/d3-dsv.v0.3.min.js"></script>
<script src="https://d3js.org/d3-request.v0.4.min.js"></script>
<script src="https://d3js.org/d3-collection.v0.3.min.js"></script>
<script src="https://d3js.org/d3-dispatch.v0.5.min.js"></script>
<script src="https://d3js.org/d3-dsv.v0.4.min.js"></script>
<script src="https://d3js.org/d3-request.v0.5.min.js"></script>
<script>
d3_request.csv("/path/to/file.csv", callback);
d3.csv("/path/to/file.csv", callback);
</script>
```
Expand Down
1 change: 0 additions & 1 deletion index.js
@@ -1,4 +1,3 @@
export {version} from "./build/package";
export {default as request} from "./src/request";
export {default as html} from "./src/html";
export {default as json} from "./src/json";
Expand Down
18 changes: 9 additions & 9 deletions package.json
Expand Up @@ -8,7 +8,7 @@
"ajax",
"XMLHttpRequest"
],
"homepage": "https://github.com/d3/d3-request",
"homepage": "https://d3js.org/d3-request/",
"license": "BSD-3-Clause",
"author": {
"name": "Mike Bostock",
Expand All @@ -22,21 +22,21 @@
"url": "https://github.com/d3/d3-request.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && json2module package.json > build/package.js && bin/rollup-node && rollup -f umd -g d3-collection:d3_collection,d3-dispatch:d3_dispatch,d3-dsv:d3_dsv -n d3_request -o build/d3-request.js -- index.js",
"pretest": "rm -rf build && mkdir build && bin/rollup-node && rollup --banner \"$(preamble)\" -f umd -g d3-collection:d3,d3-dispatch:d3,d3-dsv:d3 -n d3 -o build/d3-request.js -- index.js",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs build/d3-request.js -c -m -o build/d3-request.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-request.js ../d3.github.com/d3-request.v0.4.js && cp build/d3-request.min.js ../d3.github.com/d3-request.v0.4.min.js && cd ../d3.github.com && git add d3-request.v0.4.js d3-request.v0.4.min.js && git commit -m \"d3-request ${VERSION}\" && git push && cd - && zip -j build/d3-request.zip -- LICENSE README.md build/d3-request.js build/d3-request.min.js"
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-request.js -c -m -o build/d3-request.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-request.js ../d3.github.com/d3-request.v0.5.js && cp build/d3-request.min.js ../d3.github.com/d3-request.v0.5.min.js && cd ../d3.github.com && git add d3-request.v0.5.js d3-request.v0.5.min.js && git commit -m \"d3-request ${VERSION}\" && git push && cd - && zip -j build/d3-request.zip -- LICENSE README.md build/d3-request.js build/d3-request.min.js"
},
"dependencies": {
"d3-collection": "~0.2.0",
"d3-dispatch": "~0.4.0",
"d3-dsv": "~0.3.0",
"d3-collection": "~0.3.0",
"d3-dispatch": "~0.5.0",
"d3-dsv": "~0.4.0",
"xmlhttprequest": "1"
},
"devDependencies": {
"eslint": "2",
"json2module": "0.0",
"rollup": "0.26",
"package-preamble": "0.0",
"rollup": "0.27",
"tape": "4",
"uglify-js": "2"
}
Expand Down

0 comments on commit 17b57dc

Please sign in to comment.