From 79a0c10e8592cf70ba947725b0b14237eec01891 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Tue, 7 Jun 2016 17:35:51 -0700 Subject: [PATCH] Export to d3. Related d3/d3#2840. --- README.md | 6 +++--- index.js | 1 - package.json | 12 ++++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index bdf0c72..8820603 100644 --- a/README.md +++ b/README.md @@ -36,13 +36,13 @@ Selections are immutable. All selection methods that affect which elements are s ## Installing -If you use NPM, `npm install d3-selection`. Otherwise, download the [latest release](https://github.com/d3/d3-selection/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-selection.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_selection` global is exported: +If you use NPM, `npm install d3-selection`. Otherwise, download the [latest release](https://github.com/d3/d3-selection/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-selection.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 - + ``` diff --git a/index.js b/index.js index ecc8224..08422d2 100644 --- a/index.js +++ b/index.js @@ -1,4 +1,3 @@ -export {version} from "./build/package"; export {default as creator} from "./src/creator"; export {default as local} from "./src/local"; export {default as matcher} from "./src/matcher"; diff --git a/package.json b/package.json index 06e98c8..fa7549b 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "selection", "data-join" ], - "homepage": "https://github.com/d3/d3-selection", + "homepage": "https://d3js.org/d3-selection/", "license": "BSD-3-Clause", "author": { "name": "Mike Bostock", @@ -21,16 +21,16 @@ "url": "https://github.com/d3/d3-selection.git" }, "scripts": { - "pretest": "rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -f umd -n d3_selection -o build/d3-selection.js -- index.js", + "pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -n d3 -o build/d3-selection.js -- index.js", "test": "tape 'test/**/*-test.js' && eslint index.js src", - "prepublish": "npm run test && uglifyjs build/d3-selection.js -c -m -o build/d3-selection.min.js", - "postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection.js ../d3.github.com/d3-selection.v0.7.js && cp build/d3-selection.min.js ../d3.github.com/d3-selection.v0.7.min.js && cd ../d3.github.com && git add d3-selection.v0.7.js d3-selection.v0.7.min.js && git commit -m \"d3-selection ${VERSION}\" && git push && cd - && zip -j build/d3-selection.zip -- LICENSE README.md build/d3-selection.js build/d3-selection.min.js" + "prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-selection.js -c -m -o build/d3-selection.min.js", + "postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection.js ../d3.github.com/d3-selection.v0.8.js && cp build/d3-selection.min.js ../d3.github.com/d3-selection.v0.8.min.js && cd ../d3.github.com && git add d3-selection.v0.8.js d3-selection.v0.8.min.js && git commit -m \"d3-selection ${VERSION}\" && git push && cd - && zip -j build/d3-selection.zip -- LICENSE README.md build/d3-selection.js build/d3-selection.min.js" }, "devDependencies": { "eslint": "2", "jsdom": "9", - "json2module": "0.0", - "rollup": "0.26", + "package-preamble": "0.0", + "rollup": "0.27", "tape": "4", "uglify-js": "2" }