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 7, 2016
1 parent 64ab23d commit e82548a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ Cubehelix features monotonic lightness, while Lab and HCL are perceptually unifo

## Installing

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

Please sign in to comment.