Skip to content

Commit

Permalink
export plugins and remove dead file
Browse files Browse the repository at this point in the history
  • Loading branch information
ponelat committed Jun 15, 2017
1 parent 52cd2a5 commit 866aec2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 33 deletions.
2 changes: 1 addition & 1 deletion dist/swagger-editor.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions dist/validation.worker.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"serve-static": "http-server -i -a 0.0.0.0 -p 3001",
"prestart": "npm install",
"start": "npm-run-all --parallel serve-static open-static",
"watch": "webpack --config webpack.config.js --watch --progress"
"watch": "webpack --config ./webpack-dist.config.js --watch --progress"
},
"dependencies": {
"boron": "^0.2.3",
Expand Down
14 changes: 9 additions & 5 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,20 @@ const { GIT_DIRTY, GIT_COMMIT, PACKAGE_VERSION } = buildInfo

window.versions = window.versions || {}
window.versions.swaggerEditor = `${PACKAGE_VERSION}/${GIT_COMMIT || "unknown"}${GIT_DIRTY ? "-dirty" : ""}`
const plugins = {
EditorPlugin,
TopBarPlugin,
ValidationApiPlugin,
LocalStoragePlugin
}

const defaults = {
dom_id: "#swagger-editor",
layout: "EditorLayout",
presets: [
SwaggerUI.presets.apis
],
plugins: [
EditorPlugin,
ValidationApiPlugin,
LocalStoragePlugin
],
plugins,
components: {
EditorLayout
},
Expand All @@ -36,3 +38,5 @@ module.exports = function SwaggerEditor(options) {
mergedOptions.plugins = defaults.plugins.concat(options.plugins || [])
return SwaggerUI(mergedOptions)
}

module.exports.plugins = plugins
17 changes: 0 additions & 17 deletions src/plugins/index.js

This file was deleted.

0 comments on commit 866aec2

Please sign in to comment.