Skip to content

Commit

Permalink
Attempt to fix transition bug
Browse files Browse the repository at this point in the history
Importing transition relies on side-effects so rollup won't include it by default
  • Loading branch information
johnwalley committed Sep 4, 2016
1 parent 2777b3e commit 5f1307f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 6 deletions.
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "d3-bumps-chart",
"version": "0.0.4",
"version": "0.0.5",
"description": "Draw bumps charts.",
"keywords": [
"d3",
Expand All @@ -21,7 +21,7 @@
"url": "https://github.com/johnwalley/d3-bumps-chart.git"
},
"scripts": {
"pretest": "rm -rf build && mkdir build && rollup -c --banner \"$(preamble)\" -f umd -g d3-array:d3,d3-dsv:d3,d3-selection:d3,d3-scale:d3,d3-shape:d3,lodash:_ -n bumpsChart -o build/d3-bumps-chart.js -- index.js",
"pretest": "rm -rf build && mkdir build && rollup -c --banner \"$(preamble)\" -f umd -g d3-array:d3,d3-dsv:d3,d3-selection:d3,d3-scale:d3,d3-shape:d3,d3-transition:d3,lodash:_ -n bumpsChart -o build/d3-bumps-chart.js -- index.js",
"test": "tape 'test/**/*-test.js' && eslint index.js src",
"prepublish": "npm run test && uglifyjs --preamble \"$(preamble)\" build/d3-bumps-chart.js -c -m -o build/d3-bumps-chart.min.js",
"postpublish": "zip -j build/d3-bumps-chart.zip -- LICENSE README.md build/d3-bumps-chart.js build/d3-bumps-chart.min.js"
Expand All @@ -32,15 +32,15 @@
"d3-scale": "^1.0.3",
"d3-selection": "^1.0.2",
"d3-shape": "^1.0.3",
"d3-transition": "^1.0.2",
"lodash": "^4.15.0"
},
"devDependencies": {
"babel-preset-es2015-rollup": "^1.2.0",
"babel-preset-es2015": "^6.14.0",
"eslint": "2",
"package-preamble": "0.0.2",
"rollup": "0.34",
"rollup-plugin-babel": "^2.6.1",
"rollup-plugin-node-resolve": "^2.0.0",
"tape": "4",
"uglify-js": "^2.7.3"
}
Expand Down
4 changes: 3 additions & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import babel from 'rollup-plugin-babel';

export default {
plugins: [ babel() ],
plugins: [ babel({
exclude: 'node_modules/**'
}) ]
};
9 changes: 8 additions & 1 deletion src/.babelrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
{
"presets": ["es2015-rollup"]
"presets": [
[
"es2015",
{
"modules": false
}
]
]
}
1 change: 1 addition & 0 deletions src/bumpsChart.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {select} from 'd3-selection';
import {scaleLinear} from 'd3-scale';
import {line} from 'd3-shape';
import {max, range} from 'd3-array';
import 'd3-transition';

const abbrevCamCollege = {
'A': 'Addenbrooke\'s',
Expand Down

0 comments on commit 5f1307f

Please sign in to comment.