Skip to content

Commit 46622c9

Browse files
author
Daniel Dotsenko
committed
build script - make it leave un-minified version around
1 parent 556133a commit 46622c9

1 file changed

Lines changed: 14 additions & 10 deletions

File tree

wscript.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,25 @@ def minifyfiles(context):
77

88
src = context.Node('jspdf.js')
99

10-
minified = src.parent + 'dist/' + (src - '.js' + '.min.js').name
10+
dst = src.parent + 'dist/' + src.name - '.js' + '.source.js'
1111

12-
print("=== Compressing jsPDF and select plugins into " + minified.name)
13-
minified.text = compress_with_closure_compiler(
14-
src.text.replace(
12+
dst.text = src.text.replace(
1513
"${buildDate}", timeUTC()
1614
).replace(
1715
"${commitID}", getCommitIDstring()
18-
) +
19-
#(src - '.js' + '.plugin.from_html.js').text +
20-
#(src - '.js' + '.plugin.sillysvgrenderer.js').text
21-
(src - '.js' + '.plugin.addimage.js').text +
22-
(src - '.js' + '.plugin.standard_fonts_metrics.js').text +
16+
) + \
17+
(src - '.js' + '.plugin.addimage.js').text + \
18+
(src - '.js' + '.plugin.standard_fonts_metrics.js').text + \
2319
(src - '.js' + '.plugin.split_text_to_size.js').text
24-
)
20+
21+
# (src - '.js' + '.plugin.from_html.js').text + \
22+
# (src - '.js' + '.plugin.sillysvgrenderer.js').text + \
23+
24+
25+
minified = dst - '.source.js' + '.min.js'
26+
27+
print("=== Compressing jsPDF and select plugins into " + minified.name)
28+
minified.text = compress_with_closure_compiler( dst.text )
2529

2630
# AMD-compatible version:
2731
(minified - '.min.js' + '.amd.min.js').text = """;(function(){

0 commit comments

Comments
 (0)