feature: swagger-ui-react module (via #5207)
* swagger-ui-react alpha.0 * alpha.1 * alpha.2 * alpha.3 * begin updating README * alpha.4 * WIP: `displayOperationId` support * move loading error readouts to BaseLayout * add `url` prop * export React component as default * add interceptor support * modify docs markup * add `onComplete` prop * add `spec` prop * Update README.md * alpha.6 * remove independent manifest; build releasable exclusively from template * ensure dist is present; drop config field in manifest * drop alpha field this script is now able to release to npm! * remove unused selector references * Update README.md
This commit is contained in:
28
flavors/swagger-ui-react/release/run.sh
Executable file
28
flavors/swagger-ui-react/release/run.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
# Deploy `swagger-ui-react` to npm.
|
||||
|
||||
# Parameter Expansion: http://stackoverflow.com/questions/6393551/what-is-the-meaning-of-0-in-a-bash-script
|
||||
cd "${0%/*}"
|
||||
|
||||
mkdir ../dist
|
||||
|
||||
# Copy UI's dist files to our directory
|
||||
cp ../../../dist/swagger-ui.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 ../index.js > ../dist/index.js
|
||||
|
||||
# Copy our README into the dist folder for npm
|
||||
cp ../README.md ../dist
|
||||
|
||||
# Run the release from the dist folder
|
||||
cd ../dist
|
||||
|
||||
if [ "$PUBLISH_FLAVOR_REACT" = "true" ] ; then
|
||||
npm publish .
|
||||
else
|
||||
npm pack .
|
||||
fi
|
||||
Reference in New Issue
Block a user