[cli] commit realize, update docs

This commit is contained in:
shahidhk
2018-06-28 11:35:34 +05:30
parent 776c550654
commit 5dc47d2ff5
5 changed files with 67 additions and 3 deletions

2
cli/.gitignore vendored
View File

@@ -1,4 +1,4 @@
vendor/
vendor.orig/
.realize
_output/
*.temp

42
cli/.realize/realize.yaml Executable file
View File

@@ -0,0 +1,42 @@
settings:
files:
outputs:
status: false
name: outputs.log
logs:
status: false
name: logs.log
errors:
status: false
name: errors.log
legacy:
force: false
interval: 100ms
server:
status: false
open: false
port: 5001
host: localhost
schema:
- name: hasura-graphql-engine
path: cmd/hasura
commands:
install:
status: true
watcher:
paths:
- /
- ../../
extensions:
- go
ignored_paths:
- ../../.git
- ../../.realize
- ../../vendor
- ../../docs
- ../../build
- ../../vendor.orig
scripts:
- type: after
command: go run hasura.go docs --type md --directory ../../docs
output: true

View File

@@ -1,4 +1,4 @@
# Contributing to Hasura GraphQL Engine CLI
# Contributing
You can follow your existing Golang workflow to fork, work on a branch and
submit PR. If you're new to forking and working on Golang repositories, please
@@ -9,7 +9,26 @@ follow the instructions below to make sure the import paths are correct.
- `cd $GOPATH/src/github.com/hasura`
- `git clone https://github.com/<your-username>/graphql-engine`
- `cd graphql-engine`
- `git remote add upstream https://github.com/hasura/graphql-engine`
- `git checkout -b <branch-name>`
- Work on the feature/fix
- Add tests and ensure all tests are passing (`make test`)
- Commit, push and submit PR
## Development workflow
We suggest using [realize](https://github.com/oxequa/realize) for faster dev
workflow. The `.realize` config is already included in the repo.
- Install realize
```bash
go get github.com/oxequa/realize
```
- Start realize
```bash
realize start
```
`realize` watches the directory for changes and rebuilds the cli whenever a new
change happens. The cli is installed to `$GOPATH/bin/hasura`, which should
already be in your `PATH`. The config is located at `.realize/realize.yaml`.

View File

@@ -30,4 +30,4 @@ Read complete docs [here](docs/hasura.md).
## Contributing
Checkout the [contributing guide](CONTRIBUTING.md)
Checkout the [contributing guide](CONTRIBUTING.md).

3
cli/docs/README.md Normal file
View File

@@ -0,0 +1,3 @@
# Hasura GraphQL Engine CLI Docs
Follow [hasura](hasura.md).