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 d50b051 commit 6a81928
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 27 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ For a longer introduction, see these recommended tutorials:

## Installing

If you use NPM, `npm install d3-scale`. Otherwise, download the [latest release](https://github.com/d3/d3-scale/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-scale.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_scale` global is exported:
If you use NPM, `npm install d3-scale`. Otherwise, download the [latest release](https://github.com/d3/d3-scale/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-scale.v0.9.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-array.v0.7.min.js"></script>
<script src="https://d3js.org/d3-collection.v0.2.min.js"></script>
<script src="https://d3js.org/d3-color.v0.4.min.js"></script>
<script src="https://d3js.org/d3-format.v0.5.min.js"></script>
<script src="https://d3js.org/d3-interpolate.v0.8.min.js"></script>
<script src="https://d3js.org/d3-time.v0.2.min.js"></script>
<script src="https://d3js.org/d3-time-format.v0.3.min.js"></script>
<script src="https://d3js.org/d3-scale.v0.8.min.js"></script>
<script src="https://d3js.org/d3-array.v0.8.min.js"></script>
<script src="https://d3js.org/d3-collection.v0.3.min.js"></script>
<script src="https://d3js.org/d3-color.v0.5.min.js"></script>
<script src="https://d3js.org/d3-format.v0.6.min.js"></script>
<script src="https://d3js.org/d3-interpolate.v0.9.min.js"></script>
<script src="https://d3js.org/d3-time.v0.3.min.js"></script>
<script src="https://d3js.org/d3-time-format.v0.4.min.js"></script>
<script src="https://d3js.org/d3-scale.v0.9.min.js"></script>
<script>
var x = d3_scale.scaleLinear();
var x = d3.scaleLinear();
</script>
```
Expand Down
4 changes: 0 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
export {
version
} from "./build/package";

export {
default as scaleBand,
point as scalePoint
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"scale",
"visualization"
],
"homepage": "https://github.com/d3/d3-scale",
"homepage": "https://d3js.org/d3-scale/",
"license": "BSD-3-Clause",
"author": {
"name": "Mike Bostock",
Expand All @@ -20,24 +20,24 @@
"url": "https://github.com/d3/d3-scale.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -f umd -g d3-array:d3_array,d3-collection:d3_collection,d3-color:d3_color,d3-format:d3_format,d3-interpolate:d3_interpolate,d3-time:d3_time,d3-time-format:d3_time_format -n d3_scale -o build/d3-scale.js -- index.js",
"pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-array:d3,d3-collection:d3,d3-color:d3,d3-format:d3,d3-interpolate:d3,d3-time:d3,d3-time-format:d3 -n d3 -o build/d3-scale.js -- index.js",
"test": "TZ=America/Los_Angeles tape 'test/**/*-test.js' && eslint index.js src test",
"prepublish": "npm run test && uglifyjs build/d3-scale.js -c -m -o build/d3-scale.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-scale.js ../d3.github.com/d3-scale.v0.8.js && cp build/d3-scale.min.js ../d3.github.com/d3-scale.v0.8.min.js && cd ../d3.github.com && git add d3-scale.v0.8.js d3-scale.v0.8.min.js && git commit -m \"d3-scale ${VERSION}\" && git push && cd - && zip -j build/d3-scale.zip -- LICENSE README.md build/d3-scale.js build/d3-scale.min.js"
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-scale.js -c -m -o build/d3-scale.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-scale.js ../d3.github.com/d3-scale.v0.9.js && cp build/d3-scale.min.js ../d3.github.com/d3-scale.v0.9.min.js && cd ../d3.github.com && git add d3-scale.v0.9.js d3-scale.v0.9.min.js && git commit -m \"d3-scale ${VERSION}\" && git push && cd - && zip -j build/d3-scale.zip -- LICENSE README.md build/d3-scale.js build/d3-scale.min.js"
},
"dependencies": {
"d3-array": "~0.7.0",
"d3-collection": "~0.2.0",
"d3-color": "~0.4.0",
"d3-format": "~0.5.0",
"d3-interpolate": "~0.8.0",
"d3-time": "~0.2.0",
"d3-time-format": "~0.3.0"
"d3-array": "~0.8.0",
"d3-collection": "~0.3.0",
"d3-color": "~0.5.0",
"d3-format": "~0.6.0",
"d3-interpolate": "~0.9.0",
"d3-time": "~0.3.0",
"d3-time-format": "~0.4.0"
},
"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 6a81928

Please sign in to comment.