Skip to content
This repository has been archived by the owner on Nov 17, 2019. It is now read-only.

Commit

Permalink
Export to the global d3 in vanilla.
Browse files Browse the repository at this point in the history
Related d3/d3#2840.
  • Loading branch information
mbostock committed Jun 15, 2016
1 parent 47733ef commit 4ba0757
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2010-2015, Michael Bostock
Copyright (c) 2010-2016, Michael Bostock
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ Multi-value map syntax for [selections](https://github.com/d3/d3-selection).

## Installing

If you use NPM, `npm install d3-selection-multi`. Otherwise, download the [latest release](https://github.com/d3/d3-selection-multi/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-selection-multi.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_selection_multi` global is exported:
If you use NPM, `npm install d3-selection-multi`. Otherwise, download the [latest release](https://github.com/d3/d3-selection-multi/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-selection-multi.v0.3.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-selection.v0.7.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v0.2.min.js"></script>
<script src="https://d3js.org/d3-selection.v0.9.min.js"></script>
<script src="https://d3js.org/d3-selection-multi.v0.3.min.js"></script>
<script>
var div = d3_selection.selectAll("div");
var div = d3.selectAll("div");
</script>
```
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
"url": "https://github.com/d3/d3-selection-multi.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && json2module package.json > build/package.js && rollup -g d3-selection:d3_selection -f umd -n d3_selection_multi -o build/d3-selection-multi.js -- index.js",
"pretest": "rm -rf build && mkdir build && rollup --banner \"$(preamble)\" -f umd -g d3-selection:d3 -n d3 -o build/d3-selection-multi.js -- index.js",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs build/d3-selection-multi.js -c -m -o build/d3-selection-multi.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection-multi.js ../d3.github.com/d3-selection-multi.v0.2.js && cp build/d3-selection-multi.min.js ../d3.github.com/d3-selection-multi.v0.2.min.js && cd ../d3.github.com && git add d3-selection-multi.v0.2.js d3-selection-multi.v0.2.min.js && git commit -m \"d3-selection-multi ${VERSION}\" && git push && cd - && zip -j build/d3-selection-multi.zip -- LICENSE README.md build/d3-selection-multi.js build/d3-selection-multi.min.js"
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-selection-multi.js -c -m -o build/d3-selection-multi.min.js",
"postpublish": "VERSION=`node -e 'console.log(require(\"./package.json\").version)'`; git push && git push --tags && cp build/d3-selection-multi.js ../d3.github.com/d3-selection-multi.v0.3.js && cp build/d3-selection-multi.min.js ../d3.github.com/d3-selection-multi.v0.3.min.js && cd ../d3.github.com && git add d3-selection-multi.v0.3.js d3-selection-multi.v0.3.min.js && git commit -m \"d3-selection-multi ${VERSION}\" && git push && cd - && zip -j build/d3-selection-multi.zip -- LICENSE README.md build/d3-selection-multi.js build/d3-selection-multi.min.js"
},
"dependencies": {
"d3-selection": "~0.7.0"
"d3-selection": "~0.9.0"
},
"devDependencies": {
"eslint": "2",
"jsdom": "9",
"json2module": "0.0",
"rollup": "0.26",
"package-preamble": "0.0",
"rollup": "0.31",
"tape": "4",
"uglify-js": "2"
}
Expand Down

0 comments on commit 4ba0757

Please sign in to comment.