Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

build script: adding target for wrapping build into jQuery.NoConflict…

…-safe wrapper.

This is for cases when jQuery-dependent (fromHTML) modules are baked in.
  • Loading branch information...
commit 31e73995d641e1c4cffd1a1003527f34ef17c5a9 1 parent 916d278
Daniel Dotsenko authored
Showing with 17 additions and 6 deletions.
  1. +17 −6 wscript.py
View
23 wscript.py
@@ -16,15 +16,26 @@ def minifyfiles(context):
).replace(
"${commitID}", getCommitIDstring()
) +
+ #(src - '.js' + '.plugin.from_html.js').text +
+ #(src - '.js' + '.plugin.sillysvgrenderer.js').text
+ (src - '.js' + '.plugin.addimage.js').text +
(src - '.js' + '.plugin.standard_fonts_metrics.js').text +
- (src - '.js' + '.plugin.split_text_to_size.js').text +
- (src - '.js' + '.plugin.addimage.js').text
+ (src - '.js' + '.plugin.split_text_to_size.js').text
)
-
-
- minified_amdcompatible = minified - '.min.js' + '.amd.min.js'
- minified_amdcompatible.text = ";(function(){" + minified.text + ";define(function(){return jsPDF})})();"
+ # AMD-compatible version:
+ (minified - '.min.js' + '.amd.min.js').text = """;(function(){
+%s
+;define(function(){return jsPDF})})();
+""" % minified.text
+
+ # jQuery "NoConflict" version:
+ # only needed if some of the modules compiled into jsPDF need $
+ # one such module is fromHTML
+# (minified - '.min.js' + '.noconflict.min.js').text = """;(function($){
+# %s
+# })(jQuery);
+# """ % minified.text
def docs(context):
'''
Please sign in to comment.
Something went wrong with that request. Please try again.