File tree Expand file tree Collapse file tree 1 file changed +90
-0
lines changed Expand file tree Collapse file tree 1 file changed +90
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Contributing to Genkit
2
+
3
+ ## Build it
4
+
5
+ ```
6
+ npm i
7
+ npm run build:all
8
+ ```
9
+
10
+ This will build all packages in this repository. This is recommended the first time you check out a fresh repo or pull new revisions.
11
+
12
+ ## Pack it
13
+
14
+ Pack packages for testing/distribution.
15
+
16
+ Assuming you built everything previously....
17
+
18
+ ```
19
+ npm run pack:all
20
+ ```
21
+
22
+ this will produce tarballs in the ` dist ` folder. Also ` genkit-dist.zip ` -- a zip of all the package tarballs.
23
+
24
+ ## Link it
25
+
26
+ You will need the genkit CLI to run samples and the Dev UI
27
+
28
+ ```
29
+ cd genkit-tools
30
+ npm link
31
+ ```
32
+
33
+ ## Run it
34
+
35
+ In the ` genkit/samples ` folder you will find some samples. They might contain instructions for how to run them and what setup is necessary.
36
+
37
+ Here's one that requires no setup:
38
+
39
+ ```
40
+ cd genkit/samples/flows-sample1
41
+ genkit flow:run basic "\"hello\""
42
+ ```
43
+
44
+ Run the DevUI
45
+
46
+ ```
47
+ cd genkit/samples/flows-sample1
48
+ genkit start
49
+ ```
50
+
51
+ Point your browser to http://localhost:4000
52
+
53
+ ## Code it
54
+
55
+ FYI: ` genkit ` and ` genkit-tools ` are in two separate workspaces.
56
+
57
+ As you make changes you may want to build an test things by running samples.
58
+ You can reduce the scope of what you're building b
59
+
60
+ ```
61
+ npm run build:genkit
62
+ npm run build:genkit-tools
63
+ ```
64
+
65
+ But you can also go into specific package that you changed and run
66
+
67
+ ```
68
+ npm run build
69
+ ```
70
+
71
+ If you are going to be coding for a while they do
72
+
73
+ ```
74
+ npm run build:watch
75
+ ```
76
+
77
+ in the package that you're editing.
78
+
79
+ ## Send it
80
+
81
+ Once done coding you will want to send a PR. Always do things in a separate branch (by convention name the branch ` your_name-feature-something ` ).
82
+
83
+ Before sending the PR alwaya run
84
+
85
+ ```
86
+ npm run format
87
+ npm run build:all
88
+ ```
89
+
90
+
You can’t perform that action at this time.
0 commit comments