Skip to content

Commit ac95a38

Browse files
authored
Merge pull request #3126 from roolebo/feature/remove-babel-polyfill
packaging: fix swagger-ui-dist entry point
2 parents ea47515 + cf85f4a commit ac95a38

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

swagger-ui-dist-package/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
This directory is used to build the `swagger-ui-dist` npm package.
22

3+
`SwaggerUIBundle` and `SwaggerUIStandalonePreset` can be imported from it:
4+
```javascript
5+
import { SwaggerUIBundle, SwaggerUIStandalonePreset } from 'swagger-ui-dist'
6+
```
7+
38
For anything else, check the [Swagger-UI](https://github.com/swagger-api/swagger-ui) repository.

swagger-ui-dist-package/deploy.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ else
1818
npm pack .
1919
fi
2020

21-
find . -not -name .npmignore -not -name .npmrc -not -name deploy.sh -not -name package.json -not -name README.md -not -name *.tgz -delete
21+
find . -not -name .npmignore -not -name .npmrc -not -name deploy.sh -not -name index.js -not -name package.json -not -name README.md -not -name *.tgz -delete

swagger-ui-dist-package/index.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
module.exports.SwaggerUIBundle = require('./swagger-ui-bundle.js')
2+
module.exports.SwaggerUIStandalonePreset = require('./swagger-ui-standalone-preset.js')

swagger-ui-dist-package/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "swagger-ui-dist",
33
"version": "$$VERSION",
4-
"main": "dist/swagger-ui.js",
4+
"main": "index.js",
55
"repository": "[email protected]:swagger-api/swagger-ui.git",
66
"contributors": [
77
"(in alphabetical order)",

0 commit comments

Comments
 (0)