hyperweb-io / hyperweb-io/telescope

npx style telescope builder without having to download

Open
#23 0 comments 0 reactions 0 assignees View on GitHub
⚙️ task
Dominant language
TypeScript
Stars
154
Forks
53
PR merge metrics
No merged PRs in 30d

Description

Is it possible to wrap something like this in a module?
and instead reference `./node_modules` through a global npm install?

```sh
#!/bin/bash

PROTO_PATH=./proto
OUT_DIR=./out/proto

FILES=`find proto -type f -name "*.proto"`

mkdir -p ${OUT_DIR}

protoc \
--plugin="./node_modules/.bin/protoc-gen-ts_proto" \
--ts_proto_out="${OUT_DIR}" \
--proto_path="${PROTO_PATH}" \
--ts_proto_opt="esModuleInterop=true,forceLong=long,useOptionals='messages',outputClientImpl=true" \
${FILES}
```

- [ ] check how `protobuf-ts` does it [here](https://github.com/timostamm/protobuf-ts/tree/master/packages/plugin)

```
npx protoc --ts_out . --proto_path protos protos/my.proto
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.