feat: better lib

This commit is contained in:
TrèsAbhi committed 2024-09-29 22:42:15 -05:00
1 parent 57170469f2
commit 3e18d5a8db
7 files changed
+52 -20

No files matched your search

+3 -5
View File
@@ -26,10 +26,8 @@ await Promise.all(
const files = filesRaw.filter((file) => file.endsWith('.proto'));
const args = [
`--plugin="protoc-gen-ts=./node_modules/.bin/protoc-gen-ts${executableFileExtension}"`,
'--ts_opt=esModuleInterop=true',
`--js_out="import_style=commonjs,binary:."`,
`--ts_out="."`,
`--plugin=./node_modules/.bin/protoc-gen-ts_proto${executableFileExtension}`,
'--ts_proto_out=.',
...files.map((file) => `${ROOT}/${file}`),
];
@@ -38,6 +36,6 @@ await writeFile(
`${ROOT}/index.ts`,
files
.map((file) => file.replace('.proto', ''))
.map((file) => `export * from './${file}_pb';`)
.map((file) => `export * from './${file}.ts';`)
.join('\n'),
);