Fix #3003
This commit is contained in:
93
dist/swagger-ui-bundle.js
vendored
93
dist/swagger-ui-bundle.js
vendored
File diff suppressed because one or more lines are too long
2
dist/swagger-ui-bundle.js.map
vendored
2
dist/swagger-ui-bundle.js.map
vendored
@@ -1 +1 @@
|
||||
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA6+FA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0dA;AAkoJA;AAyiCA;;;;;AAskCA;AAg2IA;AAu5GA;AAg1FA;AAwpEA;AAu+CA;AAs/CA;AA6rCA;AAu5EA;AA+5HA;;;;;;;;;;;;;;AA6wGA;AAyoIA;AAiuJA;AA8kHA;AAonGA;AAukEA;AA02DA;AA+2EA;AAuxGA;;;;;;AAu8EA;AA23FA;;;;;AAm5CA;AA2qFA;AAw2CA;AAwkCA;AAs/CA;AAwwEA;AAq8FA;;;;;;;;;AA82BA;AA2zIA;AAk4DA;AAolDA;;;;;;AA6kCA;AA8iHA;AAipGA","sourceRoot":""}
|
||||
{"version":3,"file":"swagger-ui-bundle.js","sources":["webpack:///swagger-ui-bundle.js"],"mappings":"AAAA;AAu/FA;AA++FA;;;;;;;;;;;;;;;;;;;;;;;;;;AAoeA;;;;;;AAoIA;AAk7FA;AAmtCA;;;;;AA0uIA;AAg2IA;AA64FA;AAiyGA;AA2mFA;AA4nFA;AA+9CA;AA+gDA;AAwrCA;AA60EA;AA66HA;;;;;;;;;;;;;;AA0wIA;AA4mIA;AAquJA;AAwsHA;AA2mGA;AAiiEA;AAq4DA;AA+2DA;AA4lBA;;;;;;AA0kFA;AA80FA;;;;;AAy3CA;AA2qFA;AAw2CA;AAwkCA;AAs/CA;AA4kFA;AAy1FA;;;;;;;;;AAm5CA;AA2zIA;AAk4DA;AAolDA","sourceRoot":""}
|
||||
@@ -4,9 +4,13 @@ var webpack = require('webpack')
|
||||
var ExtractTextPlugin = require('extract-text-webpack-plugin')
|
||||
var deepExtend = require('deep-extend')
|
||||
var autoprefixer = require('autoprefixer')
|
||||
const {gitDescribeSync} = require('git-describe');
|
||||
|
||||
var loadersByExtension = require('./build-tools/loadersByExtension')
|
||||
|
||||
var pkg = require('./package.json')
|
||||
const gitInfo = gitDescribeSync(__dirname)
|
||||
|
||||
module.exports = function(options) {
|
||||
|
||||
// Special options, that have logic in this file
|
||||
@@ -60,7 +64,13 @@ module.exports = function(options) {
|
||||
'process.env': {
|
||||
NODE_ENV: specialOptions.minimize ? JSON.stringify('production') : null,
|
||||
WEBPACK_INLINE_STYLES: !Boolean(specialOptions.separateStylesheets)
|
||||
|
||||
},
|
||||
'buildInfo': JSON.stringify({
|
||||
PACKAGE_VERSION: (pkg.version),
|
||||
GIT_COMMIT: gitInfo.hash,
|
||||
GIT_DIRTY: gitInfo.dirty
|
||||
})
|
||||
}))
|
||||
|
||||
var cssLoader = 'css-loader!postcss-loader'
|
||||
|
||||
@@ -95,6 +95,7 @@
|
||||
"eslint-plugin-react": "^6.10.3",
|
||||
"extract-text-webpack-plugin": "0.8.2",
|
||||
"file-loader": "0.8.4",
|
||||
"git-describe": "^4.0.1",
|
||||
"html-webpack-plugin": "^2.28.0",
|
||||
"imports-loader": "0.6.5",
|
||||
"json-loader": "0.5.3",
|
||||
|
||||
@@ -6,6 +6,10 @@ import * as AllPlugins from "core/plugins/all"
|
||||
import { filterConfigs } from "plugins/configs"
|
||||
import { parseSeach } from "core/utils"
|
||||
|
||||
const { GIT_DIRTY, GIT_COMMIT, PACKAGE_VERSION } = buildInfo
|
||||
|
||||
window.swaggerUiVersion = `${PACKAGE_VERSION}/${GIT_COMMIT || 'unknown'}${GIT_DIRTY ? '-dirty' : ''}`
|
||||
|
||||
module.exports = function SwaggerUI(opts) {
|
||||
|
||||
const defaults = {
|
||||
|
||||
Reference in New Issue
Block a user