From 39154c570116ca4c6972a7fa2d29e0b82b187728 Mon Sep 17 00:00:00 2001 From: Mike Bostock Date: Sat, 2 Sep 2017 15:28:43 -0700 Subject: [PATCH] Update dependencies. Also replaces the prepublish script with prepublishOnly per npm, and replaces the browser field in package.json with unpkg and jsdelivr; see #3138. --- package.json | 15 ++++++++------- rollup.config.js | 11 +++++++---- rollup.node.js | 2 +- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/package.json b/package.json index 945fb0fb..4f8c51aa 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,8 @@ "url": "https://bost.ocks.org/mike" }, "main": "build/d3.node.js", - "browser": "build/d3.js", + "unpkg": "build/d3.js", + "jsdelivr": "build/d3.js", "module": "index", "jsnext:main": "index", "repository": { @@ -26,18 +27,18 @@ "scripts": { "pretest": "rimraf build && mkdir build && json2module package.json > build/package.js && node rollup.node", "test": "tape 'test/**/*-test.js'", - "prepublish": "npm run test && rollup -c --banner \"$(preamble)\" -o build/d3.js && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3.js -c negate_iife=false -m -o build/d3.min.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" }, "devDependencies": { "json2module": "0.0", "package-preamble": "0.1", "rimraf": "2", - "rollup": "^0.45.2", + "rollup": "0.49", "rollup-plugin-ascii": "0.0", "rollup-plugin-node-resolve": "3", - "tape": "^4.7.0", - "uglify-js": "^3.0.24" + "tape": "4", + "uglify-js": "3" }, "dependencies": { "d3-array": "1.2.0", @@ -48,7 +49,7 @@ "d3-color": "1.0.3", "d3-dispatch": "1.0.3", "d3-drag": "1.1.1", - "d3-dsv": "1.0.5", + "d3-dsv": "1.0.7", "d3-ease": "1.0.3", "d3-force": "1.0.6", "d3-format": "1.2.0", @@ -60,7 +61,7 @@ "d3-quadtree": "1.0.3", "d3-queue": "3.0.7", "d3-random": "1.1.0", - "d3-request": "1.0.5", + "d3-request": "1.0.6", "d3-scale": "1.0.6", "d3-selection": "1.1.0", "d3-shape": "1.2.0", diff --git a/rollup.config.js b/rollup.config.js index 7a1bcab5..ee53c916 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -2,9 +2,12 @@ import ascii from "rollup-plugin-ascii"; import node from "rollup-plugin-node-resolve"; export default { - entry: "index", + input: "index", extend: true, - format: "umd", - moduleName: "d3", - plugins: [node(), ascii()] + plugins: [node(), ascii()], + output: { + file: "build/d3.js", + format: "umd", + name: "d3" + } }; diff --git a/rollup.node.js b/rollup.node.js index 0957bed4..48f02bc3 100644 --- a/rollup.node.js +++ b/rollup.node.js @@ -3,7 +3,7 @@ var fs = require("fs"), dependencies = require("./package.json").dependencies; rollup.rollup({ - entry: "index.js", + input: "index.js", external: Object.keys(dependencies) }).then(function(bundle) { return bundle.generate({format: "cjs"});