From c5e3aaeb2734b3a84be8010b6b93a3252f073c09 Mon Sep 17 00:00:00 2001 From: Mohsen Azimi Date: Thu, 29 Jan 2015 21:13:54 -0800 Subject: [PATCH] Add documentation and npm script for gulp --- README.md | 3 +++ package.json | 1 + 2 files changed, 4 insertions(+) diff --git a/README.md b/README.md index eb90a466..7fa7c0f7 100644 --- a/README.md +++ b/README.md @@ -37,6 +37,9 @@ You can rebuild swagger-ui on your own to tweak it or just so you can say you di 2. `npm run build` 3. You should see the distribution under the dist folder. Open [`./dist/index.html`](./dist/index.html) to launch Swagger UI in a browser +### Development +Use `npm run build` to make a new build and `npm run serve` to start web server that will serve `dist` directory, watches for changes in files and reloads the page. + ### Build using Docker To build swagger-ui using a docker container: diff --git a/package.json b/package.json index 149f1582..107e2e2e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "Swagger UI is a dependency-free collection of HTML, Javascript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API", "scripts": { "build": "./node_modules/gulp/bin/gulp.js;", + "serve": "./node_modules/gulp/bin/gulp.js serve;", "test": "./node_modules/gulp/bin/gulp.js; ./node_modules/mocha/bin/mocha src/test/e2e/index.js" }, "repository": {