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 4da8539 commit 52ce6ba
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ A [quadtree](https://en.wikipedia.org/wiki/Quadtree) recursively partitions two-

## Installing

If you use NPM, `npm install d3-quadtree`. Otherwise, download the [latest release](https://github.com/d3/d3-quadtree/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-quadtree.v0.7.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_quadtree` global is exported:
If you use NPM, `npm install d3-quadtree`. Otherwise, download the [latest release](https://github.com/d3/d3-quadtree/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-quadtree.v0.8.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-quadtree.v0.7.min.js"></script>
<script src="https://d3js.org/d3-quadtree.v0.8.min.js"></script>
<script>
var quadtree = d3_quadtree.quadtree();
var quadtree = d3.quadtree();
</script>
```
Expand Down
1 change: 0 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
export {version} from "./build/package";
export {default as quadtree} from "./src/quadtree";
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"d3",
"quadtree"
],
"homepage": "https://github.com/d3/d3-quadtree",
"homepage": "https://d3js.org/d3-quadtree/",
"license": "BSD-3-Clause",
"author": {
"name": "Mike Bostock",
Expand All @@ -19,16 +19,16 @@
"url": "https://github.com/d3/d3-quadtree.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -f umd -n d3_quadtree -o build/d3-quadtree.js -- index.js",
"pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -n d3 -o build/d3-quadtree.js -- index.js",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs build/d3-quadtree.js -c -m -o build/d3-quadtree.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-quadtree.js ../d3.github.com/d3-quadtree.v0.7.js && cp build/d3-quadtree.min.js ../d3.github.com/d3-quadtree.v0.7.min.js && cd ../d3.github.com && git add d3-quadtree.v0.7.js d3-quadtree.v0.7.min.js && git commit -m \"d3-quadtree ${VERSION}\" && git push && cd - && zip -j build/d3-quadtree.zip -- LICENSE README.md build/d3-quadtree.js build/d3-quadtree.min.js"
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-quadtree.js -c -m -o build/d3-quadtree.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-quadtree.js ../d3.github.com/d3-quadtree.v0.8.js && cp build/d3-quadtree.min.js ../d3.github.com/d3-quadtree.v0.8.min.js && cd ../d3.github.com && git add d3-quadtree.v0.8.js d3-quadtree.v0.8.min.js && git commit -m \"d3-quadtree ${VERSION}\" && git push && cd - && zip -j build/d3-quadtree.zip -- LICENSE README.md build/d3-quadtree.js build/d3-quadtree.min.js"
},
"devDependencies": {
"d3-array": "0.7",
"d3-array": "0.8",
"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 52ce6ba

Please sign in to comment.