Skip to content
This repository has been archived by the owner on May 15, 2023. It is now read-only.

AMD & CommonJs #17

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 18 additions & 8 deletions build/cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,23 @@
/* jshint -W093 */
/* global document */
/** @expose cjs */
var cjs = (function (root) {
(function(root, factory) {
"use strict";

/* CommonJS */
if (typeof exports == 'object') module.exports = factory(root);

/* AMD module */
else if (typeof define == 'function' && define.amd)
define(function() {
// wrap the factory to pass root
return factory(root);
});

/* Browser global */
else root.cjs = factory(root);

}(this, function(root) {
"use strict";

// Utility functions
Expand Down Expand Up @@ -7567,10 +7583,4 @@ var COMPOUND = 'Compound',
}());

return cjs;
}(this));

// Export for node
if (typeof module !== 'undefined' && module.exports) {
/** @exports cjs */
module.exports = cjs;
}
}));
4 changes: 2 additions & 2 deletions build/cjs.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/cjs.min.js.map

Large diffs are not rendered by default.

8 changes: 1 addition & 7 deletions src/footer.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,2 @@
return cjs;
}(this));

// Export for node
if (typeof module !== 'undefined' && module.exports) {
/** @exports cjs */
module.exports = cjs;
}
}));
18 changes: 17 additions & 1 deletion src/header.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,21 @@
/* jshint -W093 */
/* global document */
/** @expose cjs */
var cjs = (function (root) {
(function(root, factory) {
"use strict";

/* CommonJS */
if (typeof exports == 'object') module.exports = factory(root);

/* AMD module */
else if (typeof define == 'function' && define.amd)
define(function() {
// wrap the factory to pass root
return factory(root);
});

/* Browser global */
else root.cjs = factory(root);

}(this, function(root) {
"use strict";