|
1 | | -# generator-openapi-repo [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] |
2 | | -> Yeoman generator for OpenAPI(fka Swagger) repo to help you share spec for your API |
| 1 | +# create-openapi-repo [![NPM version][npm-image]][npm-url] [![Dependency Status][daviddm-image]][daviddm-url] |
| 2 | +> Generator for OpenAPI(fka Swagger) repository |
3 | 3 |
|
4 | 4 | <center> |
5 | 5 |
|
@@ -34,25 +34,21 @@ This generator helps to create a GitHub repo with the following features: |
34 | 34 |
|
35 | 35 | We assume you already have [node.js](https://nodejs.org/) installed. |
36 | 36 |
|
37 | | -- First, install [Yeoman](http://yeoman.io) and `generator-openapi-repo`: |
| 37 | +- Install `create-openapi-repo` globally: |
38 | 38 | ```bash |
39 | | -npm install -g yo |
40 | | -npm install -g generator-openapi-repo |
| 39 | +npm install -g create-openapi-repo |
41 | 40 | ``` |
42 | | -- Then [create GitHub repo](https://help.github.com/articles/create-a-repo/#create-a-new-repository-on-github) where your OpenAPI spec will live. |
| 41 | +or use [`npx`](https://medium.com/@maybekatz/introducing-npx-an-npm-package-runner-55f7d4bd282b): |
| 42 | + |
| 43 | +```bash |
| 44 | +npx create-openapi-repo <spec-root> |
| 45 | +``` |
| 46 | +- [Create GitHub repo](https://help.github.com/articles/create-a-repo/#create-a-new-repository-on-github) where your OpenAPI spec will live. |
43 | 47 | - [Clone your repo](https://help.github.com/articles/cloning-a-repository/) and execute the following command inside it: |
44 | 48 | ```bash |
45 | | -yo openapi-repo |
| 49 | +create-openapi-repo . |
46 | 50 | ``` |
47 | 51 | - Commit and push your changes to the GitHub and follow instruction from `README.md` of your newly created repo. |
48 | | -**Note**: don't forget to commit the `.yo-rc.json` file, it contains all answers gave to yeoman, and they are reused during the update procedure. |
49 | | - |
50 | | -## Updating an existing project |
51 | | - - First make sure you have committed everything or have a backup |
52 | | - - Run `yo openapi-repo` over the project again |
53 | | - - `yo` will ask you for each file if you want to overwrite |
54 | | - - For those files you haven't edited, just say yes |
55 | | - - For the other ones, type `d` for diff and see what's changed |
56 | 52 |
|
57 | 53 | [npm-image]: https://badge.fury.io/js/generator-openapi-repo.svg |
58 | 54 | [npm-url]: https://npmjs.org/package/generator-openapi-repo |
|
0 commit comments