Skip to content

Commit

Permalink
Merge branch 'olivoil-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
masayuki0812 committed May 14, 2014
2 parents a8798cd + 6f3389d commit 2da7264
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
11 changes: 7 additions & 4 deletions c3.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
(function (window) {
'use strict';

/*global define, module, exports, require */

var c3 = {
version: "0.1.38"
};
Expand Down Expand Up @@ -76,7 +78,7 @@
*/
c3.generate = function (config) {

var d3 = window.d3 ? window.d3 : window.require ? window.require("d3") : undefined;
var d3 = window.d3 ? window.d3 : 'undefined' !== typeof require ? require("d3") : undefined;

var c3 = { data : {}, axis: {}, legend: {} },
cache = {};
Expand Down Expand Up @@ -4539,12 +4541,13 @@
return typeof v !== 'undefined';
}

if (typeof window.define === "function" && window.define.amd) {
window.define("c3", ["d3"], c3);
if (typeof define === "function" && define.amd) {
define("c3", ["d3"], c3);
} else if ('undefined' !== typeof exports && 'undefined' !== typeof module) {
module.exports = c3;
} else {
window.c3 = c3;
}
// TODO: module.exports

// Features:
// 1. category axis
Expand Down
4 changes: 2 additions & 2 deletions c3.min.js

Large diffs are not rendered by default.

6 changes: 4 additions & 2 deletions component.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
"name": "c3",
"repo": "masayuki0812/c3",
"description": "A D3-based reusable chart library",
"version": "0.0.1",
"version": "0.1.40",
"keywords": [],
"dependencies": {},
"dependencies": {
"mbostock/d3": "*"
},
"development": {},
"license": "MIT",
"main": "c3.js",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "c3",
"version": "0.1.38",
"version": "0.1.40",
"description": "D3-based reusable chart library",
"main": "c3.js",
"scripts": {
Expand Down

0 comments on commit 2da7264

Please sign in to comment.