Skip to content

Commit

Permalink
use package name for node & umd requires
Browse files Browse the repository at this point in the history
this breaks requireJS but fixes webpack - since the community fork of
crossfilter has a different package name from its filename, one or the
other packaging system is going to be unhappy.

requireJS users will need to rename crossfilter.js to crossfilter2.js
when copying it into position, or use the requireJS paths or map
configuration options to specify that the filename is different from the
module name.

http://requirejs.org/docs/api.html#config-paths
http://requirejs.org/docs/api.html#config-map

fixes #1213
fixes #1214
fixes #1261
fixes #1293
fixes #1302
breaks #1304!
  • Loading branch information
gordonwoodhull committed May 24, 2017
1 parent 8a0dd42 commit 8da6ebb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 2.0 Series
## 2.0.3
* crossfilter is loaded by its module name (crossfilter2), not its filename (crossfilter). This is intended to help webpack and other automatic module loaders. This is likely to break requireJS configurations; see [#1304](https://github.com/dc-js/dc.js/issues/1304) for details. ([#1213](https://github.com/dc-js/dc.js/issues/1213), [#1214](https://github.com/dc-js/dc.js/issues/1214), [#1261](https://github.com/dc-js/dc.js/issues/1261), [#1293](https://github.com/dc-js/dc.js/issues/1293), [#1302](https://github.com/dc-js/dc.js/issues/1302))
* Do not make the pie chart radius bigger than the chart size, by Sandeep Fatangare ([#1279](https://github.com/dc-js/dc.js/pull/1279))

## 2.0.2
Expand Down
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Import DC and dependencies

d3 = require("d3");
crossfilter = require("crossfilter");
crossfilter = require("crossfilter2");
module.exports = require("./dc");
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "dc",
"version": "2.0.2",
"version": "2.0.3",
"license": "Apache-2.0",
"copyright": "2017",
"description": "A multi-dimensional charting library built to work natively with crossfilter and rendered using d3.js ",
Expand Down
2 changes: 1 addition & 1 deletion src/footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ dc.crossfilter = crossfilter;

return dc;}
if(typeof define === "function" && define.amd) {
define(["d3", "crossfilter"], _dc);
define(["d3", "crossfilter2"], _dc);
} else if(typeof module === "object" && module.exports) {
var _d3 = require('d3');
var _crossfilter = require('crossfilter2');
Expand Down

0 comments on commit 8da6ebb

Please sign in to comment.