File tree 1 file changed +14
-5
lines changed
1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 3
3
4
4
## Build
5
5
6
+ ``` shell
7
+ cd plugin
8
+ ```
9
+
6
10
``` shell
7
11
spago build
8
12
```
9
13
10
14
## Bundle and Run
11
15
16
+ Bundle the plugin.
17
+
12
18
``` shell
13
19
spago bundle --platform node --minify --bundle-type app --outfile protoc-gen-purescript.mjs
14
20
```
15
21
22
+ Run the plugin.
23
+
16
24
``` shell
17
25
protoc --plugin=protoc-gen-purescript=./protoc-gen-purescript.mjs --purescript_out=. google/protobuf/timestamp.proto
18
26
```
19
27
20
28
## Unit Tests
21
29
22
30
To test purescript-protobuf, run ` nix develop ` from the top level directory
23
- of the repo, then:
31
+ of the repo, then ` cd plugin ` and generate the test messages :
24
32
25
33
``` shell
26
- protoc --purescript_out=./plugin/test/Test/generated ./plugin /test/* .proto
34
+ protoc --purescript_out=./plugin/test/Test/generated --proto_path ./test . /test/* .proto
27
35
```
28
36
29
- Or, for the bundled plugin, not the Nix store:
37
+ Or, to generate messages with the bundled plugin, not the Nix store plugin :
30
38
31
39
``` shell
32
40
protoc --plugin=protoc-gen-purescript=./protoc-gen-purescript.mjs --purescript_out=./test/Test/generated --proto_path ./test ./test/* .proto
@@ -42,10 +50,11 @@ spago test
42
50
43
51
To run the benchmarks, run ` nix develop ` from the top level directory, then:
44
52
45
- ``` console
53
+ ``` shell
46
54
cd plugin
47
55
```
48
- ``` console
56
+
57
+ ``` shell
49
58
spago test --main Test.Bench
50
59
```
51
60
You can’t perform that action at this time.
0 commit comments