Permalink
Browse files

Update dependencies.

Also replaces the prepublish script with prepublishOnly per npm, and replaces
the browser field in package.json with unpkg and jsdelivr; see d3/d3#3138.
  • Loading branch information...
mbostock committed Sep 2, 2017
1 parent 04e4363 commit d635b894fee995930f7419189255da8e66062710
Showing with 32 additions and 10 deletions.
  1. +5 −3 bin/rollup-node
  2. +8 −7 package.json
  3. +19 −0 rollup.config.js
@@ -5,12 +5,14 @@ var fs = require("fs"),
dependencies = require("../package.json").dependencies;
rollup.rollup({
entry: "index.js",
input: "index.js",
external: Object.keys(dependencies)
}).then(function(bundle) {
var code = bundle.generate({
return bundle.generate({
format: "cjs"
}).code.replace(
});
}).then(function(bundle) {
var code = bundle.code.replace(
/^'use strict';$/m,
"'use strict';\n\nvar XMLHttpRequest = require('xmlhttprequest').XMLHttpRequest;"
);
@@ -16,17 +16,18 @@
"url": "http://bost.ocks.org/mike"
},
"main": "build/d3-request.node.js",
"browser": "build/d3-request.js",
"unpkg": "build/d3-request.js",
"jsdelivr": "build/d3-request.js",
"module": "index",
"jsnext:main": "index.js",
"repository": {
"type": "git",
"url": "https://github.com/d3/d3-request.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && bin/rollup-node && rollup --banner \"$(preamble)\" -f umd -g d3-collection:d3,d3-dispatch:d3,d3-dsv:d3 -n d3 -o build/d3-request.js -- index.js",
"pretest": "rm -rf build && mkdir build && bin/rollup-node && rollup -c --banner \"$(preamble)\"",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-request.js -c -m -o build/d3-request.min.js",
"prepublishOnly": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-request.js -c -m -o build/d3-request.min.js",
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-request/build/d3-request.js d3-request.v1.js && cp ../d3-request/build/d3-request.min.js d3-request.v1.min.js && git add d3-request.v1.js d3-request.v1.min.js && git commit -m \"d3-request ${npm_package_version}\" && git push && cd - && zip -j build/d3-request.zip -- LICENSE README.md build/d3-request.js build/d3-request.min.js"
},
"dependencies": {
@@ -36,10 +37,10 @@
"xmlhttprequest": "1"
},
"devDependencies": {
"eslint": "3",
"package-preamble": "0.0",
"rollup": "0.41",
"eslint": "4",
"package-preamble": "0.1",
"rollup": "0.49",
"tape": "4",
"uglify-js": "^2.8.11"
"uglify-js": "3"
}
}
@@ -0,0 +1,19 @@
export default {
input: "index",
external: [
"d3-collection",
"d3-dispatch",
"d3-dsv"
],
output: {
extend: true,
file: "build/d3-request.js",
format: "umd",
globals: {
"d3-collection": "d3",
"d3-dispatch": "d3",
"d3-dsv": "d3"
},
name: "d3"
}
};

0 comments on commit d635b89

Please sign in to comment.