From 15d43886a3e6c79046f779492bf659d144ac61a6 Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Fri, 28 Apr 2017 10:41:47 -0700 Subject: [PATCH] Attach information to version object --- src/core/index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/index.js b/src/core/index.js index dc85ce1c..d5816329 100644 --- a/src/core/index.js +++ b/src/core/index.js @@ -6,9 +6,11 @@ import * as AllPlugins from "core/plugins/all" import { filterConfigs } from "plugins/configs" import { parseSeach } from "core/utils" +// eslint-disable-next-line no-undef const { GIT_DIRTY, GIT_COMMIT, PACKAGE_VERSION } = buildInfo -window.swaggerUiVersion = `${PACKAGE_VERSION}/${GIT_COMMIT || 'unknown'}${GIT_DIRTY ? '-dirty' : ''}` +window.versions = window.versions || {} +window.versions.swaggerUi = `${PACKAGE_VERSION}/${GIT_COMMIT || "unknown"}${GIT_DIRTY ? "-dirty" : ""}` module.exports = function SwaggerUI(opts) {