Merge pull request #1028 from mohsen1/wrap-in-iif

Wrap all SwaggerUI code in a iife
This commit is contained in:
Tony Tam
2015-03-12 18:35:46 -07:00
3 changed files with 5 additions and 4 deletions

4
dist/swagger-ui.js vendored
View File

@@ -4,7 +4,7 @@
* @link http://swagger.io
* @license Apache 2.0
*/
'use strict';
(function(){'use strict';
window.SwaggerUi = Backbone.Router.extend({
@@ -2185,4 +2185,4 @@ SwaggerUi.Views.StatusCodeView = Backbone.View.extend({
}
return this;
}
});
});}).call(this);

File diff suppressed because one or more lines are too long

View File

@@ -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())