diff --git a/CHANGELOG.md b/CHANGELOG.md index 18925df96..efed5bb2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [v1.1.5](https://github.com/gitbrent/pptxgenjs/tree/v1.1.4) (2017-01-16) +[Full Changelog](https://github.com/gitbrent/pptxgenjs/compare/v1.1.3...v1.1.5) + +**Fixed Bugs:** +- Trouble running in NW.js [\#19](https://github.com/gitbrent/PptxGenJS/issues/19) ([GregReser](https://github.com/GregReser)) +- Supported usage via node program instead of HTML [\#23](https://github.com/gitbrent/PptxGenJS/issues/23) ([parsleyt](https://github.com/parsleyt)) + ## [v1.1.4](https://github.com/gitbrent/pptxgenjs/tree/v1.1.3) (2017-01-04) [Full Changelog](https://github.com/gitbrent/pptxgenjs/compare/v1.1.3...v1.1.4) diff --git a/README.md b/README.md index c8c2bd35e..1bde39d4c 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,11 @@ PptxGenJS requires only three additional JavaScript libraries to function. npm install pptxgenjs ``` +Adding PptxGenJS to a Node project: +```javascript +var pptxgenjs = require("pptxgenjs").PptxGenJS; +``` + # Optional Library Files If you are planning on creating Shapes (basically anything other than Text, Tables or Rectangles), then you'll want to include the `pptxgen.shapes.js` library. It's a complete PowerPoint PPTX Shape object array thanks to the @@ -532,6 +537,6 @@ Here is a small [jsFiddle](https://jsfiddle.net/gitbrent/gx34jy59/5/) that is al ************************************************************************************************** # License -Copyright © 2015-2016 [Brent Ely](https://github.com/gitbrent/PptxGenJS) +Copyright © 2015-2017 [Brent Ely](https://github.com/gitbrent/PptxGenJS) [MIT](https://github.com/gitbrent/PptxGenJS/blob/master/LICENSE) diff --git a/dist/pptxgen.js b/dist/pptxgen.js index 09e0dc7a0..62a303385 100644 --- a/dist/pptxgen.js +++ b/dist/pptxgen.js @@ -6,7 +6,7 @@ |*| |*| This framework is released under the MIT Public License (MIT) |*| -|*| PptxGenJS (C) 2015-2016 Brent Ely -- https://github.com/gitbrent +|*| PptxGenJS (C) 2015-2017 Brent Ely -- https://github.com/gitbrent |*| |*| Some code derived from the OfficeGen project: |*| github.com/Ziv-Barber/officegen/ (Copyright 2013 Ziv Barber) @@ -45,15 +45,15 @@ * @see: https://msdn.microsoft.com/en-us/library/office/hh273476(v=office.14).aspx */ -// POLYFILL (SEE: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger) +// POLYFILL for IE11 (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger) Number.isInteger = Number.isInteger || function(value) { return typeof value === "number" && isFinite(value) && Math.floor(value) === value; }; var PptxGenJS = function(){ // CONSTANTS - var APP_VER = "1.1.4"; - var APP_REL = "20170103"; + var APP_VER = "1.1.5"; + var APP_REL = "20170116"; var LAYOUTS = { 'LAYOUT_4x3' : { name: 'screen4x3', width: 9144000, height: 6858000 }, 'LAYOUT_16x9' : { name: 'screen16x9', width: 9144000, height: 5143500 }, @@ -84,10 +84,7 @@ var PptxGenJS = function(){ this.masters = (typeof gObjPptxMasters !== 'undefined') ? gObjPptxMasters : {}; // D: Check for associated .js files and provide warings about anything missing - if ( typeof gObjPptxShapes === 'undefined' ) { - gObjPptxShapes = BASE_SHAPES; - try { console.warn("[WARN]: Please include the 'pptxgen.shapes.js' file if you want shapes!"); } catch(ex){} - } + if ( typeof gObjPptxShapes === 'undefined' ) gObjPptxShapes = BASE_SHAPES; /* =============================================================================================== | @@ -185,7 +182,7 @@ var PptxGenJS = function(){ } /** - * Used by {addSlidesForTable} to convert RGB colors from jQuery selectors to Hex for Presentation colors + * DESC: Used by `addSlidesForTable()` to convert RGB colors from jQuery selectors to Hex for Presentation colors */ function rgbToHex(r, g, b) { if (! Number.isInteger(r)) { try { console.warn('Integer expected!'); } catch(ex){} } @@ -1918,3 +1915,6 @@ var PptxGenJS = function(){ }); } }; + +// Node.js support (Usage: `var pptxgenjs = require("pptxgenjs").PptxGenJS;`) +if (typeof module !== 'undefined' && module.exports) exports.PptxGenJS = new PptxGenJS(); diff --git a/examples/pptxgenjs-demo-edge.html b/examples/pptxgenjs-demo-edge.html deleted file mode 100644 index 0ff837021..000000000 --- a/examples/pptxgenjs-demo-edge.html +++ /dev/null @@ -1,588 +0,0 @@ - - -
-