@3-/protojs

0.1.25 • Public • Published

@3-/protojs

test/main.coffee :

#!/usr/bin/env coffee

> @3-/protojs
  @3-/uridir
  ansis > greenBright
  path > join
  fs > readdirSync

ROOT = uridir(import.meta)

console.log await protojs join ROOT, 'api.proto'

output :

auth.proto
syntax = "proto3";

package api;

enum Stat {
  Ok = 0;              // 成功
  AccountInvalid = 1;  // 账号格式无效
  PasswordInvalid = 2; // 密码错误
}

message Sign
{
  Stat Stat = 1;
}

captcha.proto
syntax = "proto3";

package api;

message Captcha
{
  uint64 id = 1;
  bytes img = 2;
  repeated string svg_li = 3;
}

tran.proto
syntax = "proto3";

package api;

message Translated
{
  repeated string htm = 1;
  repeated string txt = 2;
}

About

This project is an open-source component of i18n.site ⋅ Internationalization Solution.

关于

本项目为 i18n.site ⋅ 国际化解决方案 的开源组件。

Dependents (1)

Package Sidebar

Install

npm i @3-/protojs

Weekly Downloads

38

Version

0.1.25

License

Apache-2.0

Unpacked Size

10.7 kB

Total Files

3

Last publish

Collaborators

  • i18n-now