Skip to content

Commit

Permalink
Prepare for major release.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbostock committed Jan 28, 2018
1 parent 30880a0 commit 19c59ba
Show file tree
Hide file tree
Showing 9 changed files with 146 additions and 58 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
*.sublime-workspace
.DS_Store
build/
dist/
node_modules
npm-debug.log
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
*.sublime-*
build/*.zip
dist/*.zip
test/
160 changes: 122 additions & 38 deletions API.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
If you use npm, `npm install d3`. Otherwise, download the [latest release](https://github.com/d3/d3/releases/latest). The released bundle supports anonymous AMD, CommonJS, and vanilla environments. You can load directly from [d3js.org](https://d3js.org), [CDNJS](https://cdnjs.com/libraries/d3), or [unpkg](https://unpkg.com/d3/). For example:

```html
<script src="https://d3js.org/d3.v4.js"></script>
<script src="https://d3js.org/d3.v5.js"></script>
```

For the minified version:

```html
<script src="https://d3js.org/d3.v4.min.js"></script>
<script src="https://d3js.org/d3.v5.min.js"></script>
```

You can also use the standalone D3 microlibraries. For example, [d3-selection](https://github.com/d3/d3-selection):
Expand Down
2 changes: 1 addition & 1 deletion d3.sublime-project
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"*.sublime-workspace"
],
"folder_exclude_patterns": [
"build"
"dist"
]
}
]
Expand Down
6 changes: 4 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
export {version} from "./build/package";
export {version} from "./dist/package";
export * from "d3-array";
export * from "d3-axis";
export * from "d3-brush";
export * from "d3-chord";
export * from "d3-collection";
export * from "d3-color";
export * from "d3-contour";
export * from "d3-dispatch";
export * from "d3-drag";
export * from "d3-dsv";
export * from "d3-ease";
export * from "d3-fetch";
export * from "d3-force";
export * from "d3-format";
export * from "d3-geo";
Expand All @@ -19,8 +21,8 @@ export * from "d3-polygon";
export * from "d3-quadtree";
export * from "d3-queue";
export * from "d3-random";
export * from "d3-request";
export * from "d3-scale";
export * from "d3-scale-chromatic";
export * from "d3-selection";
export * from "d3-shape";
export * from "d3-time";
Expand Down
24 changes: 13 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@
"name": "Mike Bostock",
"url": "https://bost.ocks.org/mike"
},
"main": "build/d3.node.js",
"unpkg": "build/d3.min.js",
"jsdelivr": "build/d3.min.js",
"main": "dist/d3.node.js",
"unpkg": "dist/d3.min.js",
"jsdelivr": "dist/d3.min.js",
"module": "index",
"jsnext:main": "index",
"repository": {
"type": "git",
"url": "https://github.com/d3/d3.git"
},
"scripts": {
"pretest": "rimraf build && mkdir build && json2module package.json > build/package.js && node rollup.node",
"pretest": "rimraf dist && mkdir dist && json2module package.json > dist/package.js && node rollup.node",
"test": "tape 'test/**/*-test.js'",
"prepublishOnly": "npm run test && rollup -c --banner \"$(preamble)\" && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3.js -c negate_iife=false -m -o build/d3.min.js",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/build/d3.js d3.v4.js && cp ../d3/build/d3.min.js d3.v4.min.js && git add d3.v4.js d3.v4.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/build/d3.js ../d3/build/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \"${npm_package_version}\" && git tag -am \"${npm_package_version}\" v${npm_package_version} && git push && git push --tags && cd - && zip -j build/d3.zip -- LICENSE README.md API.md CHANGES.md build/d3.js build/d3.min.js"
"prepublishOnly": "npm run test && rollup -c --banner \"$(preamble)\" && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" dist/d3.js -c negate_iife=false -m -o dist/d3.min.js",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3/dist/d3.js d3.v5.js && cp ../d3/dist/d3.min.js d3.v5.min.js && git add d3.v5.js d3.v5.min.js && git commit -m \"d3 ${npm_package_version}\" && git push && cd - && cd ../d3-bower && git pull && cp ../d3/LICENSE ../d3/README.md ../d3/dist/d3.js ../d3/dist/d3.min.js . && git add -- LICENSE README.md d3.js d3.min.js && git commit -m \"${npm_package_version}\" && git tag -am \"${npm_package_version}\" v${npm_package_version} && git push && git push --tags && cd - && zip -j dist/d3.zip -- LICENSE README.md API.md CHANGES.md dist/d3.js dist/d3.min.js"
},
"devDependencies": {
"json2module": "0.0",
"package-preamble": "0.1",
"rimraf": "2",
"rollup": "0.53",
"rollup": "0.55",
"rollup-plugin-ascii": "0.0",
"rollup-plugin-node-resolve": "3",
"tape": "4",
Expand All @@ -47,12 +47,14 @@
"d3-chord": "1.0.4",
"d3-collection": "1.0.4",
"d3-color": "1.0.3",
"d3-contour": "1.1.2",
"d3-dispatch": "1.0.3",
"d3-drag": "1.2.1",
"d3-dsv": "1.0.8",
"d3-ease": "1.0.3",
"d3-fetch": "1.0.0",
"d3-force": "1.1.0",
"d3-format": "1.2.1",
"d3-format": "1.2.2",
"d3-geo": "1.9.1",
"d3-hierarchy": "1.1.5",
"d3-interpolate": "1.1.6",
Expand All @@ -61,9 +63,9 @@
"d3-quadtree": "1.0.3",
"d3-queue": "3.0.7",
"d3-random": "1.1.0",
"d3-request": "1.0.6",
"d3-scale": "1.0.7",
"d3-selection": "1.2.0",
"d3-scale": "2.0.0",
"d3-scale-chromatic": "1.2.0",
"d3-selection": "1.3.0",
"d3-shape": "1.2.0",
"d3-time": "1.0.8",
"d3-time-format": "2.1.1",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
plugins: [node(), ascii()],
output: {
extend: true,
file: "build/d3.js",
file: "dist/d3.js",
format: "umd",
name: "d3"
}
Expand Down
2 changes: 1 addition & 1 deletion rollup.node.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rollup.rollup({
}).then(function(result) {
var code = result.code + "Object.defineProperty(exports, \"event\", {get: function() { return d3Selection.event; }});\n";
return new Promise(function(resolve, reject) {
fs.writeFile("build/d3.node.js", code, "utf8", function(error) {
fs.writeFile("dist/d3.node.js", code, "utf8", function(error) {
if (error) return reject(error);
else resolve();
});
Expand Down

0 comments on commit 19c59ba

Please sign in to comment.