forked from mauriciosantos/Buckets-JS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathumd-buckets.hbs
25 lines (20 loc) · 890 Bytes
/
umd-buckets.hbs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
(function (root, factory) {
// UMD (Universal Module Definition) https://github.com/umdjs/umd
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module unless amdModuleId is set
define({{#if amdModuleId}}'{{amdModuleId}}', {{/if}}[{{{amdDependencies.wrapped}}}], factory);
} else if (typeof exports === 'object') {
// Node. Does not work with strict CommonJS, but
// only CommonJS-like environments that support module.exports,
// like Node.
module.exports = factory({{{cjsDependencies.wrapped}}});
} else {
// Browser globals (root is window)
{{#if globalAlias}}root.{{{globalAlias}}} = {{else}}{{#if objectToExport}}root.{{{objectToExport}}} = {{/if}}{{/if}}factory({{{globalDependencies.normal}}});
}
}(this, function ({{dependencies}}) {
{{{code}}}
{{#if objectToExport}}
return {{{objectToExport}}};
{{/if}}
}));