Skip to content

Commit 4c8b15a

Browse files
authored
update README.md (#5)
1 parent db0724d commit 4c8b15a

File tree

2 files changed

+75
-54
lines changed

2 files changed

+75
-54
lines changed

Hawaii-Cli/CONTRIBUTING.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Contributing guide
2+
3+
1. To update the CLI tool trigger name from hawaii to any other, goto csProj file and update the ToolCommandName :
4+
```
5+
<PackAsTool>true</PackAsTool>
6+
<ToolCommandName>hawaii</ToolCommandName>
7+
<PackageOutputPath>./nupkg</PackageOutputPath>
8+
```
9+
10+
2. Goto your project directory and pack it up.
11+
```
12+
dotnet pack
13+
```
14+
15+
3. Install the tool
16+
```
17+
dotnet tool install --global --add-source ./nupkg hawaii-cli
18+
```
19+
20+
4. After making new changes. Do the below steps
21+
22+
a) update the version in *csproj:
23+
```
24+
<PropertyGroup>
25+
<Version>2.0.0</Version>
26+
</PropertyGroup>
27+
```
28+
b) pack the project :
29+
```
30+
dotnet pack
31+
```
32+
c) update the installed tool:
33+
```
34+
dotnet tool update -g --add-source ./nupkg hawaii-cli --version 2.0.0
35+
```
36+
37+
### NOTE
38+
If you see any error while installing the tool due to some class not found.
39+
40+
### FIX:
41+
Check if gql-engine(hawaii-gql) is probably not linked properly and update the correct path in .csproj file.
42+
```
43+
<ItemGroup>
44+
<Reference Include="Azure.DataGateway.Config">
45+
<HintPath>..\hawaii-gql\DataGateway.Config\bin\Debug\net6.0\Azure.DataGateway.Config.dll</HintPath>
46+
</Reference>
47+
</ItemGroup>
48+
```
49+
50+
## Share the changes
51+
1) Once you create the package (dotnet pack). It's ready to be shared.
52+
2) Share the latest package (.nupkg file).

Hawaii-Cli/README.md

Lines changed: 23 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,42 @@
1-
# hawaii-cli
2-
CLi tool for hawaii
3-
Language: C#
4-
Framework: dotnet 6.0
1+
# Hawaii CLI
52

6-
**Below are the steps to install the tool in your local machine**
3+
Command line tool for Hawaii development workflows built on
4+
C#
75

8-
1. To update the cli tool trigger name from hawaii to anyother, goto csProj file and update the ToolCommandName accordingly:
9-
```
10-
<PackAsTool>true</PackAsTool>
11-
<ToolCommandName>hawaii</ToolCommandName>
12-
<PackageOutputPath>./nupkg</PackageOutputPath>
13-
```
14-
15-
2. goto your project directory and pack it up.
16-
```
17-
dotnet pack
18-
```
19-
20-
3. Install the tool
21-
```
22-
dotnet tool install --global --add-source ./nupkg hawaii-cli
23-
```
6+
- Helpful commands to improve your workflows
7+
1.Initialize the configuration.
8+
2.Add new Entities.
9+
3.Update Entity Details
10+
4.Add/Update relationship between entities.
2411

25-
4. after making new changes. do the below steps
26-
a) update the version in *csproj:
27-
```
28-
<PropertyGroup>
29-
<Version>2.0.0</Version>
30-
</PropertyGroup>
31-
```
32-
b) pack the project : `dotnet pack`
33-
34-
c) update the installed tool:
35-
```
36-
dotnet tool update -g --add-source ./nupkg hawaii-cli --version 2.0.0
37-
```
12+
- Let the user to run locally in any environment
13+
14+
## Install
15+
You can install the CLI using `yarn` by running the following command. This will add the `graphql` binary to your path.
3816

39-
NOTE
40-
ISSUE: If you see any error while while installing the tool due to some class not found.
41-
FIX: the gql-engine(hawaii-gql) is probably not linked properly.
42-
Please update the correct path in .csproj file.
43-
```
44-
<ItemGroup>
45-
<Reference Include="Azure.DataGateway.Config">
46-
<HintPath>..\hawaii-gql\DataGateway.Config\bin\Debug\net6.0\Azure.DataGateway.Config.dll</HintPath>
47-
</Reference>
48-
</ItemGroup>
17+
```sh
18+
yarn global add graphql-cli
4919
```
5020

51-
TO SHARE THE CHANGES:
52-
1) Once you create the package (dotnet pack). It's ready to be shared.
53-
2) Share the latest package (.nupkg file).
54-
3) To install: `dotnet tool install -g --add-source ./ hawaii-cli --version <<version_number>>`
21+
The equivalent npm global install will also work.
5522

5623

24+
## Usage / Initialization
5725

58-
**To generate the config:**
26+
### Generate the config:
5927
```
6028
hawaii init -name <<filename>> --database_type <<db_type>> --connection_string <<connection_string>>
6129
```
62-
**To add entity to the config:**
30+
### Add entity to the config:
6331
```
6432
hawaii add <<entity>> -source <<source.DB>> --rest <<rest_route>> --graphql <<graphql_type>> --permission <<rules:actions>>
6533
```
66-
**To update entity to the config:**
34+
### Update entity to the config:
6735
```
6836
hawaii update <<entity>> -source <<new_source.DB>> --rest <<new_rest_route>> --graphql <<new_graphql_type>> --permissions <<rules:actions>> --fields.include <<fields to include>> --fields.exclude <<fields to exclude>>
6937
```
7038

71-
72-
73-
**example:**
39+
## Example
7440
```
7541
hawaii init -n todo-001 --database_type "mysql" --connection_string "localhost:8000"
7642
```
@@ -106,3 +72,6 @@ hawaii update todo --name todo-005 --relationship owner --target.entity user --c
10672
10773
```
10874

75+
## Contributing
76+
77+
Please read through the [contributing guidelines](./CONTRIBUTING.md)

0 commit comments

Comments
 (0)