Added Swagger

This commit is contained in:
2020-06-10 08:25:21 +02:00
parent 5c6f37eaf7
commit af76cbca87
257 changed files with 48861 additions and 12 deletions
@@ -0,0 +1,2 @@
README.md
deploy.sh
@@ -0,0 +1 @@
//registry.npmjs.org/:_authToken=${NPM_TOKEN}
@@ -0,0 +1,3 @@
This module, `swagger-editor-dist`, exposes Swagger-Editor's entire dist folder as a dependency-free npm module.
Use `swagger-editor` instead, if you'd like to have npm install dependencies for you.
@@ -0,0 +1,29 @@
# Deploy `swagger-editor-dist` to npm.
# Parameter Expansion: http://stackoverflow.com/questions/6393551/what-is-the-meaning-of-0-in-a-bash-script
cd "${0%/*}"
# Get Editor version
EDITOR_VERSION=$(node -p "require('../package.json').version")
# Replace our version placeholder with Editor's version
sed -i.bak "s/\$\$VERSION/$EDITOR_VERSION/g" package.json
rm package.json.bak
# Copy Editor's dist files to our directory
cp ../dist/* .
# Copy index.html
cp ../index.html .
# Rewire `./dist` references to `.` in index.html
sed -i.bak "s/\.\/dist/\./g" index.html
rm index.html.bak
if [ "$PUBLISH_DIST" = "true" ] || [ "$TRAVIS" = "true" ] ; then
npm publish .
else
npm pack .
fi
find . -not -name .npmignore -not -name .npmrc -not -name deploy.sh -not -name package.json -not -name README.md -not -name *.tgz -delete
@@ -0,0 +1,18 @@
{
"name": "swagger-editor-dist",
"version": "$$VERSION",
"main": "swagger-editor.js",
"repository": "git@github.com:swagger-api/swagger-editor.git",
"contributors": [
"(in alphabetical order)",
"Anna Bodnia <anna.bodnia@gmail.com>",
"Buu Nguyen <buunguyen@gmail.com>",
"Josh Ponelat <jponelat@gmail.com>",
"Kyle Shockey <kyleshockey1@gmail.com>",
"Robert Barnwell <robert@robertismy.name>",
"Sahar Jafari <shr.jafari@gmail.com>"
],
"license": "Apache-2.0",
"dependencies": {},
"devDependencies": {}
}