This commit is contained in:
Kyle Shockey
2017-04-28 10:06:43 -07:00
parent a7c90e2d77
commit b6c3f91127
5 changed files with 63 additions and 49 deletions

File diff suppressed because one or more lines are too long

View File

@@ -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":""}

View File

@@ -4,9 +4,13 @@ var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin') var ExtractTextPlugin = require('extract-text-webpack-plugin')
var deepExtend = require('deep-extend') var deepExtend = require('deep-extend')
var autoprefixer = require('autoprefixer') var autoprefixer = require('autoprefixer')
const {gitDescribeSync} = require('git-describe');
var loadersByExtension = require('./build-tools/loadersByExtension') var loadersByExtension = require('./build-tools/loadersByExtension')
var pkg = require('./package.json')
const gitInfo = gitDescribeSync(__dirname)
module.exports = function(options) { module.exports = function(options) {
// Special options, that have logic in this file // Special options, that have logic in this file
@@ -60,7 +64,13 @@ module.exports = function(options) {
'process.env': { 'process.env': {
NODE_ENV: specialOptions.minimize ? JSON.stringify('production') : null, NODE_ENV: specialOptions.minimize ? JSON.stringify('production') : null,
WEBPACK_INLINE_STYLES: !Boolean(specialOptions.separateStylesheets) 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' var cssLoader = 'css-loader!postcss-loader'

View File

@@ -95,6 +95,7 @@
"eslint-plugin-react": "^6.10.3", "eslint-plugin-react": "^6.10.3",
"extract-text-webpack-plugin": "0.8.2", "extract-text-webpack-plugin": "0.8.2",
"file-loader": "0.8.4", "file-loader": "0.8.4",
"git-describe": "^4.0.1",
"html-webpack-plugin": "^2.28.0", "html-webpack-plugin": "^2.28.0",
"imports-loader": "0.6.5", "imports-loader": "0.6.5",
"json-loader": "0.5.3", "json-loader": "0.5.3",

View File

@@ -6,6 +6,10 @@ import * as AllPlugins from "core/plugins/all"
import { filterConfigs } from "plugins/configs" import { filterConfigs } from "plugins/configs"
import { parseSeach } from "core/utils" 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) { module.exports = function SwaggerUI(opts) {
const defaults = { const defaults = {