Skip to content

Commit 8b95575

Browse files
authored
Merge pull request swagger-api#2786 from shockey/ft/dist-reorg
Dist reorganization
2 parents 2fd371b + fd8869d commit 8b95575

File tree

6 files changed

+49
-142
lines changed

6 files changed

+49
-142
lines changed

Dockerfile

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,8 @@ RUN mkdir -p /run/nginx
88
COPY nginx.conf /etc/nginx/
99

1010
# copy swagger files to the `/js` folder
11-
ADD ./dist/ /usr/share/nginx/html/js
1211
ADD ./public/* /usr/share/nginx/html/
13-
14-
# change the folder structure
15-
RUN sed -i 's/\.\.\/dist/js/g' /usr/share/nginx/html/index.html
12+
ADD ./dist/* /usr/share/nginx/html/
1613

1714
EXPOSE 8080
1815

dist/index.html

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
1+
<!-- HTML for static distribution bundle build -->
12
<!DOCTYPE html>
2-
<!-- this is for the dev server -->
33
<html lang="en">
44
<head>
55
<meta charset="UTF-8">
66
<title>Swagger UI</title>
77
<link href="https://fonts.googleapis.com/css?family=Open+Sans:400,700|Source+Code+Pro:300,600|Titillium+Web:400,600,700" rel="stylesheet">
8+
<link rel="stylesheet" type="text/css" href="./swagger-ui.css" >
9+
<link rel="icon" type="image/png" href="../public/favicon-32x32.png" sizes="32x32" />
10+
<link rel="icon" type="image/png" href="../public/favicon-16x16.png" sizes="16x16" />
811
<style>
912
html
1013
{
@@ -64,9 +67,8 @@
6467

6568
<div id="swagger-ui"></div>
6669

67-
<!-- don't be alarmed, these don't match what's in dist, because webpack-dev-server serves them in memory. -->
68-
<script src="/dist/SwaggerUIBundle.js"> </script>
69-
<script src="/dist/SwaggerUIStandalonePreset.js"> </script>
70+
<script src="./swagger-ui-bundle.js"> </script>
71+
<script src="./swagger-ui-standalone-preset.js"> </script>
7072
<script>
7173
window.onload = function() {
7274
// Build a system

dist/swagger-ui-bundle.js

Lines changed: 41 additions & 39 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/swagger-ui-bundle.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

public/index.html

Lines changed: 0 additions & 93 deletions
This file was deleted.

webpack-dist-standalone.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ module.exports = require('./make-webpack-config.js')({
1313

1414
entry: {
1515
'swagger-ui-standalone-preset': [
16-
'babel-polyfill',
1716
'./src/standalone/index.js'
1817
]
1918
},

0 commit comments

Comments
 (0)