Skip to content

Commit

Permalink
feat(swagger-ui-react): es module (#6303)
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-lai committed Aug 14, 2020
1 parent d521b8c commit c575324
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion flavors/swagger-ui-react/release/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ mkdir -p ../dist

# Copy UI's dist files to our directory
cp ../../../dist/swagger-ui.js ../dist
cp ../../../dist/swagger-ui-es-bundle.js ../dist
cp ../../../dist/swagger-ui.css ../dist

# Create a releasable package manifest
node create-manifest.js > ../dist/package.json

# Transpile our top-level component
../../../node_modules/.bin/babel --config-file ../../../babel.config.json ../index.js > ../dist/index.js
../../../node_modules/.bin/cross-env BABEL_ENV=commonjs ../../../node_modules/.bin/babel --config-file ../../../babel.config.js ../index.js > ../dist/commonjs.js
../../../node_modules/.bin/cross-env BABEL_ENV=es ../../../node_modules/.bin/babel --config-file ../../../babel.config.js ../index.js > ../dist/index.js

# Copy our README into the dist folder for npm
cp ../README.md ../dist
Expand Down
3 changes: 2 additions & 1 deletion flavors/swagger-ui-react/release/template.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"$remove": true
},
"name": "swagger-ui-react",
"main": "index.js",
"main": "commonjs.js",
"module": "index.js",
"repository": "git@github.com:swagger-api/swagger-ui.git",
"contributors": [
"(in alphabetical order)",
Expand Down

0 comments on commit c575324

Please sign in to comment.