Skip to content

Commit 4aeb331

Browse files
committed
plugin instructions
1 parent 4d2ba8c commit 4aeb331

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

plugin/README.md

+14-5
Original file line numberDiff line numberDiff line change
@@ -3,30 +3,38 @@
33

44
## Build
55

6+
```shell
7+
cd plugin
8+
```
9+
610
```shell
711
spago build
812
```
913

1014
## Bundle and Run
1115

16+
Bundle the plugin.
17+
1218
```shell
1319
spago bundle --platform node --minify --bundle-type app --outfile protoc-gen-purescript.mjs
1420
```
1521

22+
Run the plugin.
23+
1624
```shell
1725
protoc --plugin=protoc-gen-purescript=./protoc-gen-purescript.mjs --purescript_out=. google/protobuf/timestamp.proto
1826
```
1927

2028
## Unit Tests
2129

2230
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:
2432

2533
```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
2735
```
2836

29-
Or, for the bundled plugin, not the Nix store:
37+
Or, to generate messages with the bundled plugin, not the Nix store plugin:
3038

3139
```shell
3240
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
4250

4351
To run the benchmarks, run `nix develop` from the top level directory, then:
4452

45-
```console
53+
```shell
4654
cd plugin
4755
```
48-
```console
56+
57+
```shell
4958
spago test --main Test.Bench
5059
```
5160

0 commit comments

Comments
 (0)