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 4e40e88 commit 24155c3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
6 changes: 3 additions & 3 deletions README.md
Expand Up @@ -21,13 +21,13 @@ Now code you write once can be used with both Canvas (for performance) and SVG (

## Installing

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

Please sign in to comment.