Skip to content

Commit

Permalink
update for d3 v4
Browse files Browse the repository at this point in the history
  • Loading branch information
Vijith Assar committed Sep 12, 2016
1 parent 9c201da commit 8081766
Show file tree
Hide file tree
Showing 7 changed files with 331 additions and 133 deletions.
27 changes: 27 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Copyright {YEAR}, {OWNER}
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

* Neither the name of the author nor the names of contributors may be used to
endorse or promote products derived from this software without specific prior
written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
133 changes: 0 additions & 133 deletions d3-parent.js

This file was deleted.

46 changes: 46 additions & 0 deletions eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"env": {
"browser": true,
"commonjs": true
},
"extends": "eslint:recommended",
"parserOptions": {
"sourceType": "module"
},
"ecmaFeatures": {"blockBindings": true},
"rules": {
"indent": ["warn", 4],
"linebreak-style": ["error", "unix"],
"quotes": ["warn", "single"],
"semi": ["error", "always"],
"strict": ["error", "safe"],
"no-dupe-keys": "error",
"one-var": ["error", {
"var": "always",
"let": "never",
"const": "never"
}],
"space-before-function-paren": ["error", "never"],
"space-before-blocks": ["error", "always"],
"space-infix-ops": "error",
"key-spacing": ["error", {
"afterColon": true,
"mode": "strict"
}],
"func-style": ["error", "expression"],
"eqeqeq": "error",
"dot-notation": "error",
"no-redeclare": "error",
"radix": "error",
"vars-on-top": "error",
"no-trailing-spaces": "error",
"no-mixed-spaces-and-tabs": "error",
"one-var-declaration-per-line": ["error", "always"],
"newline-per-chained-call": ["error", {"ignoreChainWithDepth": 3}],
"no-console": ["error", { "allow": ["warn", "error"] }],
"no-debugger": "error",
"no-use-before-define": "error",
"no-unused-vars": ["error", {"args": "none"}],
"no-native-reassign": ["error", {"exceptions": ["document"]}]
}
}
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import { selection, select } from "d3-selection";

import { default as parent } from './src/parent';

selection.prototype.parent = parent

export { selection, select }
36 changes: 36 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"name": "d3-parent",
"version": "2.0.0",
"description": "select parent nodes",
"keywords": [
"d3",
"d3-module",
"dom",
"selection"
],
"license": "BSD-3-Clause",
"main": "build/d3-parent.js",
"jsnext:main": "index",
"homepage": "https://github.com/vijithassar/d3-parent",
"repository": {
"type": "git",
"url": "https://github.com/vijuithassar/d3-parent.git"
},
"scripts": {
"lint": "eslint --config eslintrc.json src/*.js && eslint --config eslintrc.json test/*.js",
"pretest": "rm -rf build && mkdir build && rollup -g d3-selection:d3,d3-parent:d3 -f umd -n d3 -o build/d3-parent.js -- index.js && npm run lint",
"test": "tape 'test/**/*-test.js'",
"prepublish": "npm run test && uglifyjs build/d3-parent.js -c -m -o build/d3-parent.min.js",
"postpublish": "zip -j build/d3-parent.zip -- LICENSE README.md build/d3-parent.js build/d3-parent.min.js"
},
"dependencies": {
"d3-selection": "^1.0.0"
},
"devDependencies": {
"eslint": "^3.3.1",
"jsdom": "^9.4.2",
"rollup": "0.27",
"tape": "4",
"uglify-js": "2"
}
}
Loading

0 comments on commit 8081766

Please sign in to comment.