0.1.1 • Published 2 years ago

@cosmonauts/telescope v0.1.1

Weekly downloads
-
License
SEE LICENSE IN LI...
Repository
github
Last release
2 years ago

@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:

  1. generate
  2. ts-proto
  3. 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