Skip to content
This repository has been archived by the owner on Jul 25, 2021. It is now read-only.

Commit

Permalink
v3.2.9: fix UMD factory syntax for AMD and CJS formats
Browse files Browse the repository at this point in the history
  • Loading branch information
clarketm committed Sep 5, 2016
1 parent 21a0bba commit 97f5883
Show file tree
Hide file tree
Showing 10 changed files with 30 additions and 40 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport.js",
"version": "3.2.8",
"version": "3.2.9",
"authors": [
"clarketm <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v3.2.8 (https://www.travismclarke.com)
* TableExport.js v3.2.9 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/css/tableexport.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 10 additions & 15 deletions dist/js/tableexport.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,21 @@
/*!
* TableExport.js v3.2.8 (https://www.travismclarke.com)
* TableExport.js v3.2.9 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/

;(function (root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD
define(['jquery', 'file-saver', 'xlsx'], factory);
} else if (typeof exports === 'object') {
// Node, CommonJS-like
module.exports = function (root, jQuery) {
if (jQuery === undefined) {
jQuery = typeof window !== 'undefined' ? require('jquery') : require('jquery')(root);
}
return factory(jQuery, require('file-saver'), require('xlsx'));
};
// AMD. Register as an anonymous module.
define(['exports', 'jquery', 'file-saver', 'xlsx'], factory);
} else if (typeof exports === 'object' && typeof exports.nodeName !== 'string') {
// CommonJS
factory(exports, require('jquery'), require('file-saver'), require('xlsx'));
} else {
// Browser globals (root is window)
root.TableExport = factory(root.jQuery, root.saveAs, root.XLSX)
// Browser globals
factory(root, root.jQuery, root.saveAs, root.XLSX);
}
}(this, function ($, saveAs, XLSX) {
}(this, function (exports, $, saveAs, XLSX) {
'use strict';
/**
* TableExport main plugin constructor
Expand Down Expand Up @@ -482,7 +477,7 @@
$.fn.tableExport[prop] = TableExport.prototype[prop];
}

return TableExport;
exports.default = exports.TableExport = TableExport;

}
));
4 changes: 2 additions & 2 deletions dist/js/tableexport.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "tableexport",
"version": "3.2.8",
"version": "3.2.9",
"authors": [
"clarketm <[email protected]>"
],
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* TableExport.js v3.2.8 (https://www.travismclarke.com)
* TableExport.js v3.2.9 (https://www.travismclarke.com)
* Copyright 2016 Travis Clarke
* Licensed under the MIT license
*/
Expand Down
2 changes: 1 addition & 1 deletion src/stable/css/tableexport.min.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 97f5883

Please sign in to comment.