Skip to content

Commit

Permalink
Add some docs to the readme for login and open
Browse files Browse the repository at this point in the history
  • Loading branch information
Dom Harrington committed Oct 1, 2018
1 parent 495e96a commit 430125f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,14 @@ npm install rdme

## Usage

### Logging in to a ReadMe project

If you login to a project, you will not have to provide the `--key` option because we save it locally:

```sh
rdme login
```

### Uploading a new Swagger file to ReadMe

```sh
Expand All @@ -36,5 +44,13 @@ rdme docs path-to-markdown-files --key={api-key} --version={project-version}
rdme docs:edit <slug> --key={api-key} --version={project-version}
```

### Open your ReadMe project in your browser

If you are logged in, this will open the project in your browser:

```sh
rdme open
```

## Future
We will be expanding and modifying the feature set of this program as/when we expand our public API. Some things will be changed.
2 changes: 1 addition & 1 deletion lib/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function getCredentials(opts) {
return {
email: await read({ prompt: 'Email:', default: configStore.get('email') }),
password: await read({ prompt: 'Password:', silent: true }),
project: opts.project ? opts.project : await read({ prompt: 'Project:', default: configStore.get('project') }),
project: opts.project || await read({ prompt: 'Project:', default: configStore.get('project') }),
};
}

Expand Down

0 comments on commit 430125f

Please sign in to comment.