From 0011b2a7e2b60b9991294b1133b9aed438e78edb Mon Sep 17 00:00:00 2001 From: Kyle Shockey Date: Fri, 6 Oct 2017 17:13:30 -0700 Subject: [PATCH] Development docs! --- docs/SUMMARY.md | 2 -- docs/development/setting-up.md | 24 ++++++++++++++++++++++++ docs/usage/installation.md | 2 -- 3 files changed, 24 insertions(+), 4 deletions(-) create mode 100644 docs/development/setting-up.md diff --git a/docs/SUMMARY.md b/docs/SUMMARY.md index c30fc24f..5e20feb8 100644 --- a/docs/SUMMARY.md +++ b/docs/SUMMARY.md @@ -12,6 +12,4 @@ - [Plugin API](customization/plugin-api.md) ### Development -- [Architecture overview](development/architecture.md) - [Setting up a dev environment](development/setting-up.md) -- [Test suite](development/test-suite.md) diff --git a/docs/development/setting-up.md b/docs/development/setting-up.md new file mode 100644 index 00000000..f0ee2ae4 --- /dev/null +++ b/docs/development/setting-up.md @@ -0,0 +1,24 @@ +# Setting up a dev environment + +Swagger-UI includes a development server that provides hot module reloading and unminified stack traces, for easier development. + +### Prerequisites + +- Node.js `6.0.0` or greater +- npm `3.0.0` or greater +- git, any version + + +### Steps + +1. `git clone git@github.com:swagger-api/swagger-ui.git` +2. `cd swagger-ui` +3. `npm install` +4. `npm run dev` +5. Wait a bit +6. Open http://localhost:3200/ + +## Bonus round + +- Swagger-UI includes an ESLint rule definition. If you use a graphical editor, consider installing an ESLint plugin, which will point out syntax and style errors for you as you code. + - The linter runs as part of the PR test sequence, so don't think you can get away with not paying attention to it! diff --git a/docs/usage/installation.md b/docs/usage/installation.md index 56875c27..1a7f9ba7 100644 --- a/docs/usage/installation.md +++ b/docs/usage/installation.md @@ -35,8 +35,6 @@ app.use(express.static(pathToSwaggerUi)) app.listen(3000) ``` - - ### Docker Hub You can pull a pre-built docker image of the swagger-ui directly from Dockerhub: