File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 33
44## Build
55
6+ ``` shell
7+ cd plugin
8+ ```
9+
610``` shell
711spago build
812```
913
1014## Bundle and Run
1115
16+ Bundle the plugin.
17+
1218``` shell
1319spago bundle --platform node --minify --bundle-type app --outfile protoc-gen-purescript.mjs
1420```
1521
22+ Run the plugin.
23+
1624``` shell
1725protoc --plugin=protoc-gen-purescript=./protoc-gen-purescript.mjs --purescript_out=. google/protobuf/timestamp.proto
1826```
1927
2028## Unit Tests
2129
2230To 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
3240protoc --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
4351To run the benchmarks, run ` nix develop ` from the top level directory, then:
4452
45- ``` console
53+ ``` shell
4654cd plugin
4755```
48- ``` console
56+
57+ ``` shell
4958spago test --main Test.Bench
5059```
5160
You can’t perform that action at this time.
0 commit comments