## Folder structure
npm install test-damnx-1- efc-protobuf <=== efc-protobuf main .proto
- proto
- flight-normal
- xxx.proto
- service-foc
- aaa.proto
- bbb.proto
- service-category
- ...
- protobuf_js <=== we are here gen code .proto to typescript .ts
```
cd efc-protobuf/protobuf_js
....
Must install:
- node v.16+
- npm
- yarn
- protoc
- protoc-gen-js
`sh`
yarn
This command line include copy package.json and README.md to dist.
It will be automatically generated when run two commands above. But only once for each time.
#### Add more proto folder
Update file vite.config.ts.
Find these lines and update them:
`ts`
ProtocTypescriptGenerator({
includes: [
{
input: "../proto/service-category",
output: "service-category/typescript",
},
// Add more here to build and comment them after build
],
}),
example
`ts
export * as serviceCategoryAirport from "./service-category/typescript/proto/service-category/airport";
export * as serviceCategoryFareCondition from "./service-category/typescript/proto/service-category/fare-condition";
export * as serviceCategoryMasterData from "./service-category/typescript/proto/service-category/master-data";
export * as serviceCategoryRoute from "./service-category/typescript/proto/service-category/route";
`update version trong package.json
run :
yarn buildPlease follow NPM's documentation.
Notice: Publish folder
dist`. It's included all files needed.