diff --git a/bower.json.bak b/bower.json.bak deleted file mode 100644 index 9033b17ab..000000000 --- a/bower.json.bak +++ /dev/null @@ -1,27 +0,0 @@ -{ - "name": "jspdf", - "homepage": "https://github.com/mrrio/jspdf", - "description": "PDF Document creation from JavaScript", - "main": "dist/jspdf.debug.js", - "moduleType": [ - "amd", - "globals" - ], - "keywords": [ - "pdf" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "libs", - "CNAME", - "jspdf.js", - "examples/jspdf.PLUGINTEMPLATE.js", - "plugins/*", - "todo.txt", - "wscript.py", - "build.sh", - "test", - "tools" - ] -} diff --git a/examples/context2d/test_context2d.html b/examples/context2d/test_context2d.html index 65318e50d..d45461005 100644 --- a/examples/context2d/test_context2d.html +++ b/examples/context2d/test_context2d.html @@ -14,398 +14,396 @@ Context2D Test - - - + + + + + diff --git a/examples/context2d/test_context2d_paths.html b/examples/context2d/test_context2d_paths.html index 50cd30703..2c3aadd8d 100644 --- a/examples/context2d/test_context2d_paths.html +++ b/examples/context2d/test_context2d_paths.html @@ -15,13 +15,14 @@ Context2D Paths Test - + - + + - diff --git a/tools/jsdoc_template/allclasses.tmpl b/tools/jsdoc_template/allclasses.tmpl deleted file mode 100755 index 32f43582f..000000000 --- a/tools/jsdoc_template/allclasses.tmpl +++ /dev/null @@ -1,17 +0,0 @@ -
{+new Link().toFile("index.html").withText("Class Index")+} -| {+new Link().toFile("files.html").withText("File Index")+}
-
-

Classes

- -
\ No newline at end of file diff --git a/tools/jsdoc_template/allfiles.tmpl b/tools/jsdoc_template/allfiles.tmpl deleted file mode 100755 index 4c7de1cd5..000000000 --- a/tools/jsdoc_template/allfiles.tmpl +++ /dev/null @@ -1,56 +0,0 @@ - - - - - {! Link.base = ""; /* all generated links will be relative to this */ !} - JsDoc Reference - File Index - - - - - - - {+include("static/header.html")+} - -
- {+publish.classesIndex+} -
- -
-

File Index

- - -
-

{+new Link().toSrc(item.alias).withText(item.name)+}

- {+resolveLinks(item.desc)+} -
- -
Author:
-
{+item.author+}
-
- -
Version:
-
{+item.version+}
-
- {! var locations = item.comment.getTag('location').map(function($){return $.toString().replace(/(^\$ ?| ?\$$)/g, '').replace(/^HeadURL: https:/g, 'http:');}) !} - -
Location:
- -
{+location+}
-
-
-
-
-
-
- -
-
- ©{+JSDOC.opt.D.copyright+}
- Documentation generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+} -
- - \ No newline at end of file diff --git a/tools/jsdoc_template/class.tmpl b/tools/jsdoc_template/class.tmpl deleted file mode 100755 index 2a56f08c8..000000000 --- a/tools/jsdoc_template/class.tmpl +++ /dev/null @@ -1,643 +0,0 @@ - - - - - - {! Link.base = "../"; /* all generated links will be relative to this */ !} - JsDoc Reference - {+data.alias+} - - - - - - - - {+include("static/header.html")+} - - - -
- - {+publish.classesIndex+} - -
- -
- -

- {! - var classType = ""; - - if (data.isBuiltin()) { - classType += "Built-In "; - } - - if (data.isNamespace) { - if (data.is('FUNCTION')) { - classType += "Function "; - } - classType += "Namespace "; - } - else { - classType += "Class "; - } - !} - {+classType+}{+data.alias+} -

- - -

-
Version - {+ data.version +}.
-
-
Extends - {+ - data.augments - .sort() - .map( - function($) { return new Link().toSymbol($); } - ) - .join(", ") - +}.
-
- - {+resolveLinks(data.classDesc)+} - - {# isn't defined in any file #} -
Defined in: {+new Link().toSrc(data.srcFile)+}. -
-

- - - - - - - - - - - - - - - - - -
{+classType+}Summary
Constructor AttributesConstructor Name and Description
{! - if (data.isPrivate) output += "<private> "; - if (data.isInner) output += "<inner> "; - !}  -
- {+ new Link().toSymbol(data.alias).inner('constructor')+}{+ makeSignature(data.params) +} -
-
{+resolveLinks(summarize(data.desc))+}
-
-
- - - - {! var ownProperties = data.properties.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - - - - - - - - - - - - - - - - - -
Field Summary
Field AttributesField Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isConstant) output += "<constant> "; - !}  -
- {+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
- - -
- {! - var borrowedMembers = data.properties.filter(function($) {return $.memberOf != data.alias}); - - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Fields borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - !} -
-
-
- - - - {! var ownMethods = data.methods.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - - - - - - - - - - - - - - - - - -
Method Summary
Method AttributesMethod Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - !}  -
{+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name.replace(/\^\d+$/, ''))+}{+makeSignature(member.params)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
- - -
- {! - var borrowedMembers = data.methods.filter(function($) {return $.memberOf != data.alias}); - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Methods borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - - !} -
-
-
- - - {! var ownEvents = data.events.filter(function($){return $.memberOf == data.alias && !$.isNamespace}).sort(makeSortby("name")); !} - - - - - - - - - - - - - - - - - -
Event Summary
Event AttributesEvent Name and Description
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - !}  -
{+member.memberOf+}.{+new Link().toSymbol(member.alias).withText(member.name)+}{+makeSignature(member.params)+} -
-
{+resolveLinks(summarize(member.desc))+}
-
-
- - -
- {! - var borrowedMembers = data.events.filter(function($) {return $.memberOf != data.alias}); - var contributers = []; - borrowedMembers.map(function($) {if (contributers.indexOf($.memberOf) < 0) contributers.push($.memberOf)}); - for (var i = 0, l = contributers.length; i < l; i++) { - output += - "
Events borrowed from class "+new Link().toSymbol(contributers[i])+":
" - + - "
" + - borrowedMembers - .filter( - function($) { return $.memberOf == contributers[i] } - ) - .sort(makeSortby("name")) - .map( - function($) { return new Link().toSymbol($.alias).withText($.name) } - ) - .join(", ") - + - "
"; - } - - !} -
-
-
- - - -
-
- {+classType+}Detail -
- -
{! - if (data.isPrivate) output += "<private> "; - if (data.isInner) output += "<inner> "; - !} - {+ data.alias +}{+ makeSignature(data.params) +} -
- -
- {+resolveLinks(data.desc)+} -
Author: {+data.author+}.
-
- - - -
{+example+}
-
-
- - - -
-
Parameters:
- -
- {+((item.type)?""+("{"+(new Link().toSymbol(item.type)+"} ")) : "")+} {+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Deprecated:
-
- {+resolveLinks(data.deprecated)+} -
-
-
- -
-
Since:
-
{+ data.since +}
-
-
- -
-
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
-
- -
-
Requires:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
- - - -
- Field Detail -
- - -
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - if (member.isConstant) output += "<constant> "; - !} - - {{+new Link().toSymbol(member.type)+}} - {+member.memberOf+}.{+member.name+} - -
-
- {+resolveLinks(member.desc)+} - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
-
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
-
- -
-
Since:
-
{+ member.since +}
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
Default Value:
-
- {+resolveLinks(member.defaultValue)+} -
-
-
- -
-
-
- - - -
- Method Detail -
- - -
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - !} - - {{+new Link().toSymbol(member.type)+}} - {+member.memberOf+}.{+member.name.replace(/\^\d+$/, '')+}{+makeSignature(member.params)+} - -
-
- {+resolveLinks(member.desc)+} - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
-
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Parameters:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
-
- -
-
Since:
-
{+ member.since +}
-
- -
- -
-
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+resolveLinks(item.desc)+}
-
-
-
- -
-
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
-
- -
-
Requires:
- -
{+ resolveLinks(item) +}
-
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
-
- - - -
- Event Detail -
- - -
{! - if (member.isPrivate) output += "<private> "; - if (member.isInner) output += "<inner> "; - !} - - {{+new Link().toSymbol(member.type)+}} - {+member.memberOf+}.{+member.name+}{+makeSignature(member.params)+} - -
-
- {+resolveLinks(member.desc)+} - -
- Defined in: {+new Link().toSrc(member.srcFile)+}. -
-
Author: {+member.author+}.
-
- - - -
{+example+}
-
-
- - -
-
Parameters:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+item.name+} - Optional, Default: {+item.defaultValue+} -
-
{+ resolveLinks(item.desc) +}
-
-
-
- -
-
Deprecated:
-
- {+ resolveLinks(member.deprecated) +} -
-
-
- -
-
Since:
-
{+ member.since +}
-
- -
- -
-
Throws:
- -
- {+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+} {+item.name+} -
-
{+ resolveLinks(item.desc) +}
-
-
-
- -
-
Returns:
- -
{+((item.type)?"{"+(new Link().toSymbol(item.type))+"} " : "")+}{+resolveLinks(item.desc)+}
-
-
-
- -
-
Requires:
- -
{+ resolveLinks(item) +}
-
-
-
- -
-
See:
- -
{+ new Link().toSymbol(item) +}
-
-
-
- -
-
-
- -
-
- - - -
- ©{+JSDOC.opt.D.copyright+}
- Documentation generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+} -
- - diff --git a/tools/jsdoc_template/index.tmpl b/tools/jsdoc_template/index.tmpl deleted file mode 100755 index a5dc1158e..000000000 --- a/tools/jsdoc_template/index.tmpl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - JsDoc Reference - Index - - - - - - - {+include("static/header.html")+} - -
- {+publish.classesIndex+} -
- -
-

Class Index

- - -
-

{+(new Link().toSymbol(thisClass.alias))+}

- {+resolveLinks(summarize(thisClass.classDesc))+} -
-
-
- -
-
- ©{+JSDOC.opt.D.copyright+}
- Documentation generated by JsDoc Toolkit {+JSDOC.VERSION+} on {+new Date()+} -
- - \ No newline at end of file diff --git a/tools/jsdoc_template/publish.js b/tools/jsdoc_template/publish.js deleted file mode 100755 index 42300f4b4..000000000 --- a/tools/jsdoc_template/publish.js +++ /dev/null @@ -1,201 +0,0 @@ -/** Called automatically by JsDoc Toolkit. */ -function publish(symbolSet) { - publish.conf = { // trailing slash expected for dirs - ext: ".html", - outDir: JSDOC.opt.d || SYS.pwd+"../out/jsdoc/", - templatesDir: JSDOC.opt.t || SYS.pwd+"../templates/jsdoc/", - symbolsDir: "symbols/", - srcDir: "symbols/src/" - }; - - // is source output is suppressed, just display the links to the source file - if (JSDOC.opt.s && defined(Link) && Link.prototype._makeSrcLink) { - Link.prototype._makeSrcLink = function(srcFilePath) { - return "<"+srcFilePath+">"; - } - } - - // create the folders and subfolders to hold the output - IO.mkPath((publish.conf.outDir+"symbols/src").split("/")); - - // used to allow Link to check the details of things being linked to - Link.symbolSet = symbolSet; - - // create the required templates - try { - var classTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"class.tmpl"); - var classesTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allclasses.tmpl"); - } - catch(e) { - print("Couldn't create the required templates: "+e); - quit(); - } - - // some ustility filters - function hasNoParent($) {return ($.memberOf == "")} - function isaFile($) {return ($.is("FILE"))} - function isaClass($) {return ($.is("CONSTRUCTOR") || $.isNamespace)} - - // get an array version of the symbolset, useful for filtering - var symbols = symbolSet.toArray(); - - // create the hilited source code files - var files = JSDOC.opt.srcFiles; - for (var i = 0, l = files.length; i < l; i++) { - var file = files[i]; - var srcDir = publish.conf.outDir + "symbols/src/"; - makeSrcFile(file, srcDir); - } - - // get a list of all the classes in the symbolset - var classes = symbols.filter(isaClass).sort(makeSortby("alias")); - - // create a filemap in which outfiles must be to be named uniquely, ignoring case - if (JSDOC.opt.u) { - var filemapCounts = {}; - Link.filemap = {}; - for (var i = 0, l = classes.length; i < l; i++) { - var lcAlias = classes[i].alias.toLowerCase(); - - if (!filemapCounts[lcAlias]) filemapCounts[lcAlias] = 1; - else filemapCounts[lcAlias]++; - - Link.filemap[classes[i].alias] = - (filemapCounts[lcAlias] > 1)? - lcAlias+"_"+filemapCounts[lcAlias] : lcAlias; - } - } - - // create a class index, displayed in the left-hand column of every class page - Link.base = "../"; - publish.classesIndex = classesTemplate.process(classes); // kept in memory - - // create each of the class pages - for (var i = 0, l = classes.length; i < l; i++) { - var symbol = classes[i]; - - symbol.events = symbol.getEvents(); // 1 order matters - symbol.methods = symbol.getMethods(); // 2 - - Link.currentSymbol= symbol; - var output = ""; - output = classTemplate.process(symbol); - - IO.saveFile(publish.conf.outDir+"symbols/", ((JSDOC.opt.u)? Link.filemap[symbol.alias] : symbol.alias) + publish.conf.ext, output); - } - - // regenerate the index with different relative links, used in the index pages - Link.base = ""; - publish.classesIndex = classesTemplate.process(classes); - - // create the class index page - try { - var classesindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"index.tmpl"); - } - catch(e) { print(e.message); quit(); } - - var classesIndex = classesindexTemplate.process(classes); - IO.saveFile(publish.conf.outDir, "index"+publish.conf.ext, classesIndex); - classesindexTemplate = classesIndex = classes = null; - - // create the file index page - try { - var fileindexTemplate = new JSDOC.JsPlate(publish.conf.templatesDir+"allfiles.tmpl"); - } - catch(e) { print(e.message); quit(); } - - var documentedFiles = symbols.filter(isaFile); // files that have file-level docs - var allFiles = []; // not all files have file-level docs, but we need to list every one - - for (var i = 0; i < files.length; i++) { - allFiles.push(new JSDOC.Symbol(files[i], [], "FILE", new JSDOC.DocComment("/** */"))); - } - - for (var i = 0; i < documentedFiles.length; i++) { - var offset = files.indexOf(documentedFiles[i].alias); - allFiles[offset] = documentedFiles[i]; - } - - allFiles = allFiles.sort(makeSortby("name")); - - // output the file index page - var filesIndex = fileindexTemplate.process(allFiles); - IO.saveFile(publish.conf.outDir, "files"+publish.conf.ext, filesIndex); - fileindexTemplate = filesIndex = files = null; -} - - -/** Just the first sentence (up to a full stop). Should not break on dotted variable names. */ -function summarize(desc) { - if (typeof desc != "undefined") - return desc.match(/([\w\W]+?\.)[^a-z0-9_$]/i)? RegExp.$1 : desc; -} - -/** Make a symbol sorter by some attribute. */ -function makeSortby(attribute) { - return function(a, b) { - if (a[attribute] != undefined && b[attribute] != undefined) { - a = a[attribute].toLowerCase(); - b = b[attribute].toLowerCase(); - if (a < b) return -1; - if (a > b) return 1; - return 0; - } - } -} - -/** Pull in the contents of an external file at the given path. */ -function include(path) { - var path = publish.conf.templatesDir+path; - return IO.readFile(path); -} - -/** Turn a raw source file into a code-hilited page in the docs. */ -function makeSrcFile(path, srcDir, name) { - if (JSDOC.opt.s) return; - - if (!name) { - name = path.replace(/\.\.?[\\\/]/g, "").replace(/[\\\/]/g, "_"); - name = name.replace(/\:/g, "_"); - } - - var src = {path: path, name:name, charset: IO.encoding, hilited: ""}; - - if (defined(JSDOC.PluginManager)) { - JSDOC.PluginManager.run("onPublishSrc", src); - } - - if (src.hilited) { - IO.saveFile(srcDir, name+publish.conf.ext, src.hilited); - } -} - -/** Build output for displaying function parameters. */ -function makeSignature(params) { - if (!params) return "()"; - var signature = "(" - + - params.filter( - function($) { - return $.name.indexOf(".") == -1; // don't show config params in signature - } - ).map( - function($) { - return $.name; - } - ).join(", ") - + - ")"; - return signature; -} - -/** Find symbol {@link ...} strings in text and turn into html links */ -function resolveLinks(str, from) { - str = str.replace(/\{@link ([^} ]+) ?\}/gi, - function(match, symbolName) { - return new Link().toSymbol(symbolName); - } - ); - - return str; -} diff --git a/tools/jsdoc_template/static/default.css b/tools/jsdoc_template/static/default.css deleted file mode 100755 index 97e021ef6..000000000 --- a/tools/jsdoc_template/static/default.css +++ /dev/null @@ -1,162 +0,0 @@ -/* default.css */ -body -{ - font: 12px "Lucida Grande", Tahoma, Arial, Helvetica, sans-serif; - width: 800px; -} - -.header -{ - clear: both; - background-color: #ccc; - padding: 8px; -} - -h1 -{ - font-size: 150%; - font-weight: bold; - padding: 0; - margin: 1em 0 0 .3em; -} - -hr -{ - border: none 0; - border-top: 1px solid #7F8FB1; - height: 1px; -} - -pre.code -{ - display: block; - padding: 8px; - border: 1px dashed #ccc; -} - -#index -{ - margin-top: 24px; - float: left; - width: 160px; - position: absolute; - left: 8px; - background-color: #F3F3F3; - padding: 8px; -} - -#content -{ - margin-left: 190px; - width: 600px; -} - -.classList -{ - list-style-type: none; - padding: 0; - margin: 0 0 0 8px; - font-family: arial, sans-serif; - font-size: 1em; - overflow: auto; -} - -.classList li -{ - padding: 0; - margin: 0 0 8px 0; -} - -.summaryTable { width: 100%; } - -h1.classTitle -{ - font-size:170%; - line-height:130%; -} - -h2 { font-size: 110%; } -caption, div.sectionTitle -{ - background-color: #7F8FB1; - color: #fff; - font-size:130%; - text-align: left; - padding: 2px 6px 2px 6px; - border: 1px #7F8FB1 solid; -} - -div.sectionTitle { margin-bottom: 8px; } -.summaryTable thead { display: none; } - -.summaryTable td -{ - vertical-align: top; - padding: 4px; - border-bottom: 1px #7F8FB1 solid; - border-right: 1px #7F8FB1 solid; -} - -/*col#summaryAttributes {}*/ -.summaryTable td.attributes -{ - border-left: 1px #7F8FB1 solid; - width: 140px; - text-align: right; -} - -td.attributes, .fixedFont -{ - line-height: 15px; - color: #002EBE; - font-family: "Courier New",Courier,monospace; - font-size: 13px; -} - -.summaryTable td.nameDescription -{ - text-align: left; - font-size: 13px; - line-height: 15px; -} - -.summaryTable td.nameDescription, .description -{ - line-height: 15px; - padding: 4px; - padding-left: 4px; -} - -.summaryTable { margin-bottom: 8px; } - -ul.inheritsList -{ - list-style: square; - margin-left: 20px; - padding-left: 0; -} - -.detailList { - margin-left: 20px; - line-height: 15px; -} -.detailList dt { margin-left: 20px; } - -.detailList .heading -{ - font-weight: bold; - padding-bottom: 6px; - margin-left: 0; -} - -.light, td.attributes, .light a:link, .light a:visited -{ - color: #777; - font-style: italic; -} - -.fineprint -{ - text-align: right; - font-size: 10px; -} \ No newline at end of file diff --git a/tools/jsdoc_template/static/header.html b/tools/jsdoc_template/static/header.html deleted file mode 100755 index 353b735a4..000000000 --- a/tools/jsdoc_template/static/header.html +++ /dev/null @@ -1,2 +0,0 @@ - \ No newline at end of file diff --git a/tools/jsdoc_template/static/index.html b/tools/jsdoc_template/static/index.html deleted file mode 100755 index 661f6f67d..000000000 --- a/tools/jsdoc_template/static/index.html +++ /dev/null @@ -1,19 +0,0 @@ - - - - - Generated Javascript Documentation - - - - - - <body> - <p> - This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. - </p> - </body> - - - \ No newline at end of file diff --git a/tools/jsdoc_template/symbol.tmpl b/tools/jsdoc_template/symbol.tmpl deleted file mode 100755 index e824690f4..000000000 --- a/tools/jsdoc_template/symbol.tmpl +++ /dev/null @@ -1,32 +0,0 @@ - - {+data.name+} - {+data.memberOf+} - {+data.isa+} - {+data.desc+} - {+data.classDesc+} - - - - {+method.name+} - {+method.memberOf+} - {+method.desc+} - - - {+param.type+} - {+param.name+} - {+param.desc+} - {+param.defaultValue+} - - - - - - - - {+property.name+} - {+property.memberOf+} - {+property.desc+} - {+property.type+} - - - diff --git a/wscript.py b/wscript.py deleted file mode 100755 index 123fa0e1a..000000000 --- a/wscript.py +++ /dev/null @@ -1,159 +0,0 @@ -#! /usr/bin/python - -def default(context): - minifyfiles(context) - -def minifyfiles(context): - - src = context.Node('jspdf.js') - - dst = src.parent + 'dist/' + src.name - '.js' + '.source.js' - - dst.text = src.text.replace( - "${buildDate}", timeUTC() - ).replace( - "${commitID}", getCommitIDstring() - ) + \ - (src - 'jspdf.js' + 'libs/polyfill.js').text + \ - (src - '.js' + '.plugin.addimage.js').text + \ - (src - '.js' + '.plugin.autoprint.js').text + \ - (src - '.js' + '.plugin.cell.js').text + \ - (src - '.js' + '.plugin.from_html.js').text + \ - (src - '.js' + '.plugin.sillysvgrenderer.js').text + \ - (src - '.js' + '.plugin.split_text_to_size.js').text + \ - (src - '.js' + '.plugin.standard_fonts_metrics.js').text + \ - (src - '.js' + '.plugin.total_pages.js').text + \ - (src - 'jspdf.js' + 'libs/Blob.js/Blob.js').text + \ - (src - 'jspdf.js' + 'libs/FileSaver.js/FileSaver.js').text + \ - (src - 'jspdf.js' + 'libs/deflate.js').text + \ - (src - 'jspdf.js' + 'libs/adler32cs.js/adler32cs.js').text - # (src - '.js' + '.plugin.from_html.js').text + \ - # - - - minified = dst - '.source.js' + '.min.js' - - print("=== Compressing jsPDF and select plugins into " + minified.name) - minified.text = compress_with_closure_compiler( dst.text ) - - # 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): - ''' - java -jar %jsdocbindir%\jsrun.jar %jsdocbindir%\app\run.js -v %rootdir%\jspdf.js -d=%rootdir%\doc -t=%rootdir%\tools\jsdoc_template - ''' - - jsdocBinDir = context.Node('~/bin/jsdoc-toolkit/') - codefile = context.Node('jspdf.js') - destinationFolder = context.Node('doc/') - templateFolder = context.Node('tools/jsdoc_template/') - - import subprocess - subprocess.call( - [ - 'java' - , '-jar' - , (jsdocBinDir + 'jsrun.jar').absolutepath - , (jsdocBinDir + 'app/run.js').absolutepath - , '-v' - , codefile.absolutepath - , '-d='+destinationFolder.absolutepath - , '-t='+templateFolder.absolutepath - ] - ) - -def timeUTC(): - import datetime - return datetime.datetime.utcnow().strftime("%Y-%m-%dT%H:%M") - -def getCommitIDstring(): - import subprocess - - if not hasattr( subprocess, "check_output"): - # let's not bother emulating it. Not important - return "" - else: - return subprocess.check_output( - [ - 'git' - , 'rev-parse' - , 'HEAD' - ] - ).strip() - -def compress_with_closure_compiler(code, compression_level = None): - '''Sends text of JavaScript code to Google's Closure Compiler API - Returns text of compressed code. - ''' - # script (with some modifications) from - # https://developers.google.com/closure/compiler/docs/api-tutorial1 - - import httplib, urllib, sys - - compression_levels = [ - 'WHITESPACE_ONLY' - , 'SIMPLE_OPTIMIZATIONS' - , 'ADVANCED_OPTIMIZATIONS' - ] - - if compression_level not in compression_levels: - compression_level = compression_levels[1] # simple optimizations - - # Define the parameters for the POST request and encode them in - # a URL-safe format. - params = urllib.urlencode([ - ('js_code', code) - , ('compilation_level', compression_level) - , ('output_format', 'json') - , ('output_info', 'compiled_code') - , ('output_info', 'warnings') - , ('output_info', 'errors') - , ('output_info', 'statistics') - # , ('output_file_name', 'default.js') - # , ('js_externs', 'javascript with externs') # only used on Advanced. - ]) - - # Always use the following value for the Content-type header. - headers = { "Content-type": "application/x-www-form-urlencoded" } - conn = httplib.HTTPConnection('closure-compiler.appspot.com') - conn.request('POST', '/compile', params, headers) - response = conn.getresponse() - - if response.status != 200: - raise Exception("Compilation server responded with non-OK status of " + str(response.status)) - - compressedcode = response.read() - conn.close() - - import json # needs python 2.6+ or simplejson module for earlier - parts = json.loads(compressedcode) - - if 'errors' in parts: - prettyerrors = ['\nCompilation Error:'] - for error in parts['errors']: - prettyerrors.append( - "\nln %s, ch %s, '%s' - %s" % ( - error['lineno'] - , error['charno'] - , error['line'] - , error['error'] - ) - ) - raise Exception(''.join(prettyerrors)) - - return parts['compiledCode'] - -if __name__ == '__main__': - print("This is a Wak build automation tool script. Please, get Wak on GitHub and run it against the folder containing this automation script.")