Skip to content

Commit ed29353

Browse files
committed
Let's make the default builds AMD-compatible, thus no need for an additional amd-specific file
1 parent 103bf58 commit ed29353

2 files changed

Lines changed: 7 additions & 4 deletions

File tree

jspdf.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,5 +1953,8 @@ Examples:
19531953
*/
19541954
jsPDF.API = {'events': []};
19551955

1956+
if (typeof define === 'function') {
1957+
define(function(){return jsPDF});
1958+
}
19561959
return global.jsPDF = jsPDF;
19571960
}(this));

wscript.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def minifyfiles(context):
3838
minified.text = compress_with_closure_compiler( dst.text )
3939

4040
# AMD-compatible version:
41-
(minified - '.min.js' + '.amd.min.js').text = """;(function(){
42-
%s
43-
;define(function(){return jsPDF})})();
44-
""" % minified.text
41+
# (minified - '.min.js' + '.amd.min.js').text = """;(function(){
42+
# %s
43+
# ;define(function(){return jsPDF})})();
44+
# """ % minified.text
4545

4646
# jQuery "NoConflict" version:
4747
# only needed if some of the modules compiled into jsPDF need $

0 commit comments

Comments
 (0)