|
| 1 | +/** |
| 2 | + * config.js |
| 3 | + * Copyright (c) 2014 Steven Spungin (TwelveTone LLC) steven@twelvetone.tv |
| 4 | + * Copyright (c) 2015 James Hall (Parallax Agency Ltd) james@parall.ax |
| 5 | + * |
| 6 | + * Licensed under the MIT License. |
| 7 | + * http://opensource.org/licenses/mit-license |
| 8 | + */ |
| 9 | + |
| 10 | +/** |
| 11 | + * This file declaratively defines jsPDF plugin dependencies. |
| 12 | + * |
| 13 | + * This allows a host page to simply include require.js and bootstrap the page with a single require statement. |
| 14 | + */ |
| 15 | + |
| 16 | +// Skip if Require.JS not installed |
| 17 | +if (typeof require === 'object') { |
| 18 | + |
| 19 | +if (typeof require_baseUrl_override === 'undefined'){ |
| 20 | + require_baseUrl_override = '../'; |
| 21 | +} |
| 22 | + |
| 23 | +require.config({ |
| 24 | + baseUrl: require_baseUrl_override, |
| 25 | + shim:{ |
| 26 | + 'plugins/standard_fonts_metrics':{ |
| 27 | + deps:[ |
| 28 | + 'jspdf' |
| 29 | + ] |
| 30 | + }, |
| 31 | + |
| 32 | + 'plugins/split_text_to_size':{ |
| 33 | + deps:[ |
| 34 | + 'jspdf' |
| 35 | + ] |
| 36 | + }, |
| 37 | + |
| 38 | + 'plugins/annotations' : { |
| 39 | + deps:[ |
| 40 | + 'jspdf', |
| 41 | + 'plugins/standard_fonts_metrics', |
| 42 | + 'plugins/split_text_to_size' |
| 43 | + ] |
| 44 | + }, |
| 45 | + |
| 46 | + 'plugins/outline':{ |
| 47 | + deps:[ |
| 48 | + 'jspdf' |
| 49 | + ] |
| 50 | + }, |
| 51 | + |
| 52 | + 'plugins/addimage':{ |
| 53 | + deps:[ |
| 54 | + 'jspdf' |
| 55 | + ] |
| 56 | + }, |
| 57 | + |
| 58 | + 'plugins/png_support':{ |
| 59 | + deps:[ |
| 60 | + 'jspdf', |
| 61 | + 'libs/png_support/png', |
| 62 | + 'libs/png_support/zlib' |
| 63 | + ] |
| 64 | + }, |
| 65 | + |
| 66 | + 'plugins/from_html':{ |
| 67 | + deps:[ |
| 68 | + 'jspdf' |
| 69 | + ] |
| 70 | + }, |
| 71 | + |
| 72 | + 'plugins/context2d':{ |
| 73 | + deps:[ |
| 74 | + 'jspdf', |
| 75 | + 'plugins/png_support', |
| 76 | + 'plugins/addimage', |
| 77 | + 'libs/css_colors' |
| 78 | + ] |
| 79 | + }, |
| 80 | + |
| 81 | + 'libs/html2canvas/dist/html2canvas':{ |
| 82 | + deps:[ |
| 83 | + 'jspdf' |
| 84 | + ] |
| 85 | + }, |
| 86 | + |
| 87 | + 'plugins/canvas' : { |
| 88 | + deps:[ |
| 89 | + 'jspdf' |
| 90 | + ] |
| 91 | + }, |
| 92 | + |
| 93 | + 'plugins/acroform': { |
| 94 | + deps: [ |
| 95 | + 'jspdf', |
| 96 | + 'plugins/annotations' |
| 97 | + ] |
| 98 | + }, |
| 99 | + |
| 100 | + 'html2pdf' : { |
| 101 | + deps:[ |
| 102 | + 'jspdf', |
| 103 | + 'plugins/standard_fonts_metrics', |
| 104 | + 'plugins/split_text_to_size', |
| 105 | + 'plugins/png_support', |
| 106 | + 'plugins/context2d', |
| 107 | + 'plugins/canvas', |
| 108 | + 'plugins/annotations', |
| 109 | + |
| 110 | + 'libs/html2canvas/dist/html2canvas' |
| 111 | + ] |
| 112 | + }, |
| 113 | + |
| 114 | + 'test/test_harness':{ |
| 115 | + deps:[ |
| 116 | + 'jspdf', |
| 117 | + 'jspdf.plugin.standard_fonts_metrics', |
| 118 | + 'jspdf.plugin.split_text_to_size' |
| 119 | + ] |
| 120 | + } |
| 121 | + }, |
| 122 | + paths:{ |
| 123 | + 'html2pdf': 'libs/html2pdf' |
| 124 | + } |
| 125 | +}); |
| 126 | +} // Require.JS |
0 commit comments