Skip to content

Commit

Permalink
New: Support for ES Module loading
Browse files Browse the repository at this point in the history
  • Loading branch information
AllanJard committed Sep 8, 2022
1 parent 57ec443 commit 252a645
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 35 deletions.
33 changes: 0 additions & 33 deletions js/dataTables.responsive.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,35 +19,6 @@
*
* For details please refer to: http://www.datatables.net
*/
(function( factory ){
if ( typeof define === 'function' && define.amd ) {
// AMD
define( ['jquery', 'datatables.net'], function ( $ ) {
return factory( $, window, document );
} );
}
else if ( typeof exports === 'object' ) {
// CommonJS
module.exports = function (root, $) {
if ( ! root ) {
root = window;
}

if ( ! $ || ! $.fn.dataTable ) {
$ = require('datatables.net')(root, $).$;
}

return factory( $, root, root.document );
};
}
else {
// Browser
factory( jQuery, window, document );
}
}(function( $, window, document, undefined ) {
'use strict';
var DataTable = $.fn.dataTable;


/**
* Responsive is a plug-in for the DataTables library that makes use of
Expand Down Expand Up @@ -1509,7 +1480,3 @@ $(document).on( 'preInit.dt.dtr', function (e, settings, json) {
}
}
} );


return Responsive;
}));
4 changes: 2 additions & 2 deletions make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ css_frameworks responsive $OUT_DIR/css

# Copy JS
rsync -r js $OUT_DIR
js_compress $OUT_DIR/js/dataTables.responsive.js
js_frameworks responsive $OUT_DIR/js
js_wrap $OUT_DIR/js/dataTables.responsive.js "jquery datatables.net"
js_frameworks responsive $OUT_DIR/js "jquery datatables.net-FW datatables.net-responsive"

# Copy Types
if [ -d $OUT_DIR/types ]; then
Expand Down

0 comments on commit 252a645

Please sign in to comment.