Wrap all SwaggerUI code in a iife
to avoid leaking globals other than SwaggerUi and swaggerUi TODO: we should remove swaggerUi global dependency too
This commit is contained in:
@@ -59,6 +59,7 @@ gulp.task('dist', ['clean'], function() {
|
||||
)
|
||||
.pipe(order(['scripts.js', 'templates.js']))
|
||||
.pipe(concat('swagger-ui.js'))
|
||||
.pipe(wrap('(function(){<%= contents %>}).call(this);'))
|
||||
.pipe(header(banner, { pkg: pkg } ))
|
||||
.pipe(gulp.dest('./dist'))
|
||||
.pipe(uglify())
|
||||
|
||||
Reference in New Issue
Block a user