@cosmonauts/telescope
v0.1.1
Published
A TypeScript Transpiler for Comsos Protobufs
Downloads
48
Readme
@cosmonauts/telescope
A TypeScript Transpiler for Comsos Protobufs
$ telescope
? [cmd] what do you want to do? (Use arrow keys or type to search)
❯ generate
transpile
ts-proto
Generally, you will want to run commands in this order:
- generate
- ts-proto
- transpile
generate
Use the generate
command to create a new repository with the default proto files.
telescope generate
cd ./your-new-project
yarn
ts-proto
Next, run the ts-proto
command
telescope ts-proto
You should now seem some .ts
files generated in ./out
.
transpile
Finally, run the transpile
command. This is where we add some ts-proto
enhancements and output the final code.
telescope transpile
You should now seem some .ts
files generated in ./src
. These are the real source files used in your application.
programatic usage
import telescope from '@cosmonauts/telescope';
// specify proto path and out path
telescope(protoPath, outPath);
Building with Telescope
You will need the protoc
command installed on your machine.
mac
http://google.github.io/proto-lens/installing-protoc.html
brew install protobuf