remove passing spec params to SwaggerUIBundle

server test json files via webpack-dev-server
This commit is contained in:
RVKen
2017-07-06 09:51:01 +02:00
parent a3249f0d6f
commit 170dcece36
4 changed files with 3 additions and 10 deletions

View File

@@ -3,6 +3,7 @@ var path = require('path')
var webpack = require('webpack')
var ExtractTextPlugin = require('extract-text-webpack-plugin')
var HtmlWebpackPlugin = require('html-webpack-plugin')
const CopyWebpackPlugin = require('copy-webpack-plugin')
var deepExtend = require('deep-extend')
const {gitDescribeSync} = require('git-describe')
@@ -76,17 +77,12 @@ module.exports = function(rules, options) {
plugins.push( new webpack.NoEmitOnErrorsPlugin())
} else { // development mode
var spec
if (specialOptions.testSpecName) {
spec = require('./test/e2e/specs/' + specialOptions.testSpecName)
}
plugins.push(
new HtmlWebpackPlugin({
template: 'dev-helpers/template.ejs',
spec: spec && encodeURI(JSON.stringify(spec)) // using given test spec definition
})
)
plugins.push(new CopyWebpackPlugin([ { from: 'test/e2e/specs', to: 'test-specs' } ]))
}
plugins.push(