Commit 48e449ba authored by Mike Bostock's avatar Mike Bostock
Browse files

Smash dependencies!

parent 86e8f88c
......@@ -22,9 +22,9 @@ src/core/format-localized.js: src/locale.js src/core/format-locale.js
src/time/format-localized.js: src/locale.js src/time/format-locale.js
LC_TIME=$(LOCALE) locale -ck LC_TIME | node src/locale.js src/time/format-locale.js > $@
d3%js: src/d3%js src/core/format-localized.js src/time/format-localized.js
d3.js: $(shell node_modules/.bin/smash --list src/d3.js)
@rm -f $@
node_modules/.bin/smash $< > $@.tmp
node_modules/.bin/smash src/d3.js > $@.tmp
node_modules/.bin/uglifyjs $@.tmp -b indent-level=2 -o $@
@rm $@.tmp
@chmod a-w $@
......
......@@ -23,7 +23,6 @@ d3 = function() {
function d3_cosh(x) {
return (Math.exp(x) + Math.exp(-x)) / 2;
}
var d3_format_decimalPoint = ".", d3_format_thousandsSeparator = ",", d3_format_grouping = [ 3, 3 ];
if (!Date.now) Date.now = function() {
return +new Date();
};
......@@ -593,6 +592,7 @@ d3 = function() {
};
return event;
}
var d3_format_decimalPoint = ".", d3_format_thousandsSeparator = ",", d3_format_grouping = [ 3, 3 ];
d3.format = function(specifier) {
var match = d3_format_re.exec(specifier), fill = match[1] || " ", align = match[2] || ">", sign = match[3] || "", basePrefix = match[4] || "", zfill = match[5], width = +match[6], comma = match[7], precision = match[8], type = match[9], scale = 1, suffix = "", integer = false;
if (precision) precision = +precision.substring(1);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -31,7 +31,7 @@
"jsdom": "~0.5.2"
},
"devDependencies": {
"smash": "0.0.x",
"smash": "~0.0.2",
"uglify-js": "2.2.x",
"vows": "0.7.x"
},
......
var d3_format_decimalPoint = ".",
d3_format_thousandsSeparator = ",",
d3_format_grouping = [3, 3];
import "format-localized";
d3.format = function(specifier) {
var match = d3_format_re.exec(specifier),
fill = match[1] || " ",
......
import "start";
import "core/core";
import "core/format-localized";
import "compat/date";
import "compat/style";
import "core/class";
......
......@@ -33,7 +33,7 @@ console.log(JSON.stringify({
"jsdom": "~0.5.2"
},
"devDependencies": {
"smash": "0.0.x",
"smash": "~0.0.2",
"uglify-js": "2.2.x",
"vows": "0.7.x"
},
......
// The date and time format (%c), date format (%x) and time format (%X).
var d3_time_formatDateTime = "%a %b %e %X %Y",
d3_time_formatDate = "%m/%d/%Y",
d3_time_formatTime = "%H:%M:%S";
// The weekday and month names.
var d3_time_days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
d3_time_dayAbbreviations = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
d3_time_months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
d3_time_monthAbbreviations = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment