Comparing version 1.2.1 to 1.2.2
{ | ||
"name": "d3-drag", | ||
"version": "1.2.1", | ||
"version": "1.2.2", | ||
"description": "Drag and drop SVG, HTML or Canvas using mouse or touch input.", | ||
@@ -18,3 +18,3 @@ "keywords": [ | ||
}, | ||
"main": "build/d3-drag.js", | ||
"main": "dist/d3-drag.min.js", | ||
"module": "index", | ||
@@ -27,6 +27,6 @@ "jsnext:main": "index", | ||
"scripts": { | ||
"pretest": "rm -rf build && mkdir build && rollup -c --banner \"$(preamble)\"", | ||
"pretest": "rollup -c", | ||
"test": "tape 'test/**/*-test.js' && eslint index.js src", | ||
"prepublishOnly": "npm run test && uglifyjs -b beautify=false,preamble=\"'$(preamble)'\" build/d3-drag.js -c -m -o build/d3-drag.min.js", | ||
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../d3-drag/build/d3-drag.js d3-drag.v1.js && cp ../d3-drag/build/d3-drag.min.js d3-drag.v1.min.js && git add d3-drag.v1.js d3-drag.v1.min.js && git commit -m \"d3-drag ${npm_package_version}\" && git push && cd - && zip -j build/d3-drag.zip -- LICENSE README.md build/d3-drag.js build/d3-drag.min.js" | ||
"prepublishOnly": "rm -rf dist && yarn test", | ||
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v1.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v1.min.js && git add ${npm_package_name}.v1.js ${npm_package_name}.v1.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd - && zip -j dist/${npm_package_name}.zip -- LICENSE README.md dist/${npm_package_name}.js dist/${npm_package_name}.min.js" | ||
}, | ||
@@ -38,8 +38,7 @@ "dependencies": { | ||
"devDependencies": { | ||
"eslint": "4", | ||
"package-preamble": "0.1", | ||
"rollup": "0.50", | ||
"tape": "4", | ||
"uglify-js": "3" | ||
"eslint": "5", | ||
"rollup": "0.64", | ||
"rollup-plugin-terser": "1", | ||
"tape": "4" | ||
} | ||
} |
@@ -117,3 +117,3 @@ # d3-drag | ||
<a href="#touchable" name="touchable">#</a> <i>drag</i>.<b>touchable</b>([<i>touchable</i>]) [<>](https://github.com/d3/d3-drag/blob/master/src/drag.js#L153 "Source") | ||
<a href="#drag_touchable" name="drag_touchable">#</a> <i>drag</i>.<b>touchable</b>([<i>touchable</i>]) [<>](https://github.com/d3/d3-drag/blob/master/src/drag.js#L153 "Source") | ||
@@ -175,3 +175,3 @@ If *touchable* is specified, sets the touch support detector to the specified function and returns the drag behavior. If *touchable* is not specified, returns the current touch support detector, which defaults to: | ||
If *distance* is specified, sets the maximum distance that the mouse can move between mousedown and mouseup that will trigger a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to *distance* from its position on mousedown, the click event follwing mouseup will be suppressed. If *distance* is not specified, returns the current distance threshold, which defaults to zero. The distance threshold is measured in client coordinates ([*event*.clientX](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX) and [*event*.clientY](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY)). | ||
If *distance* is specified, sets the maximum distance that the mouse can move between mousedown and mouseup that will trigger a subsequent click event. If at any point between mousedown and mouseup the mouse is greater than or equal to *distance* from its position on mousedown, the click event following mouseup will be suppressed. If *distance* is not specified, returns the current distance threshold, which defaults to zero. The distance threshold is measured in client coordinates ([*event*.clientX](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientX) and [*event*.clientY](https://developer.mozilla.org/en-US/docs/Web/API/MouseEvent/clientY)). | ||
@@ -178,0 +178,0 @@ <a href="#drag_on" name="drag_on">#</a> <i>drag</i>.<b>on</b>(<i>typenames</i>, [<i>listener</i>]) [<>](https://github.com/d3/d3-drag/blob/master/src/drag.js#L157 "Source") |
@@ -1,14 +0,36 @@ | ||
const definition = require("./package.json"); | ||
const dependencies = Object.keys(definition.dependencies); | ||
import {terser} from "rollup-plugin-terser"; | ||
import * as meta from "./package.json"; | ||
export default { | ||
input: "index", | ||
external: dependencies, | ||
const config = { | ||
input: "index.js", | ||
external: Object.keys(meta.dependencies || {}), | ||
output: { | ||
file: `dist/${meta.name}.js`, | ||
name: "d3", | ||
format: "umd", | ||
indent: false, | ||
extend: true, | ||
file: `build/${definition.name}.js`, | ||
format: "umd", | ||
globals: dependencies.reduce((p, v) => (p[v] = "d3", p), {}), | ||
name: "d3" | ||
banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`, | ||
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).map(key => ({[key]: "d3"}))) | ||
}, | ||
plugins: [] | ||
}; | ||
export default [ | ||
config, | ||
{ | ||
...config, | ||
output: { | ||
...config.output, | ||
file: `dist/${meta.name}.min.js` | ||
}, | ||
plugins: [ | ||
...config.plugins, | ||
terser({ | ||
output: { | ||
preamble: config.output.banner | ||
} | ||
}) | ||
] | ||
} | ||
}; | ||
]; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
4
463
73604
14
1