mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-06 08:24:05 +01:00
gulp-umd
Explicitly pass root to the factory function.
This commit is contained in:
14
gulpfile.js
14
gulpfile.js
@@ -75,7 +75,19 @@ function buildTask() {
|
||||
.pipe(replace('{{ version }}', package.version))
|
||||
.pipe(umd({
|
||||
// We want a global always to ensure that we match previous behaviour
|
||||
templateName: 'returnExportsGlobal',
|
||||
templateSource:
|
||||
";(function(root, factory) {\n"+
|
||||
" if (typeof define === 'function' && define.amd) {\n"+
|
||||
" define(<%= amd %>, factory);\n"+
|
||||
" } else if (typeof exports === 'object') {\n"+
|
||||
" module.exports = factory.call(root,<%= cjs %>);\n"+
|
||||
" } else {\n"+
|
||||
" root.<%= namespace %> = factory.call(root,<%= global %>);\n"+
|
||||
" }\n"+
|
||||
"}(this, function(<%= param %>) {\n"+
|
||||
"<%= contents %>\n"+
|
||||
"return <%= exports %>;\n"+
|
||||
"}));\n",
|
||||
dependencies: function() {
|
||||
return ['moment']
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user