@@ -36,6 +36,10 @@ function isFalse(a) {
36
36
) ;
37
37
}
38
38
39
+ function inputBoolean ( a , dflt ) {
40
+ return ! a ? dflt : ! isFalse ( a ) ;
41
+ }
42
+
39
43
function inputArray ( a , dflt ) {
40
44
dflt = dflt . slice ( ) ;
41
45
@@ -52,6 +56,7 @@ if(process.argv.length > 2) {
52
56
var args = minimist ( process . argv . slice ( 2 ) , { } ) ;
53
57
54
58
// parse arguments
59
+ var unminified = inputBoolean ( args . unminified , false ) ;
55
60
var out = args . out ? args . out : 'custom' ;
56
61
var traces = inputArray ( args . traces , allTraces ) ;
57
62
var transforms = inputArray ( args . transforms , allTransforms ) ;
@@ -61,10 +66,15 @@ if(process.argv.length > 2) {
61
66
transformList : createList ( [ ] , transforms , allTransforms , 'transform' ) ,
62
67
63
68
name : out ,
64
- index : path . join ( constants . pathToLib , 'index-' + out + '.js' ) ,
65
- distMin : path . join ( constants . pathToDist , 'plotly-' + out + '.min.js' )
69
+ index : path . join ( constants . pathToLib , 'index-' + out + '.js' )
66
70
} ;
67
71
72
+ if ( unminified ) {
73
+ opts . dist = path . join ( constants . pathToDist , 'plotly-' + out + '.js' ) ;
74
+ } else {
75
+ opts . distMin = path . join ( constants . pathToDist , 'plotly-' + out + '.min.js' ) ;
76
+ }
77
+
68
78
console . log ( opts ) ;
69
79
70
80
opts . calendars = true ;
0 commit comments