Skip to content

Commit 3993347

Browse files
authored
chore(bens-types): update package structure and build scripts (#1677)
* Updated .gitignore to include index.js and index.d.ts * Changed main and types paths in package.json to point to index files * Modified compile scripts for proto and TypeScript to reflect new structure
1 parent f72c740 commit 3993347

3 files changed

Lines changed: 10 additions & 5 deletions

File tree

blockscout-ens/types/.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
/dist
1+
/dist
2+
index.js
3+
index.d.ts

blockscout-ens/types/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
export * from './dist/types';
2+
export * from './dist/domains_extractor';
3+
export * from './dist/multichain_domains';

blockscout-ens/types/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22
"name": "@blockscout/bens-types",
33
"version": "0.0.1",
44
"description": "TypeScript definitions for BENS microservice",
5-
"main": "./dist/bens-proto/proto/bens.js",
6-
"types": "./dist/bens-proto/proto/bens.d.ts",
5+
"main": "./index.js",
6+
"types": "./index.d.ts",
77
"scripts": {
88
"build": "npm run compile:proto && npm run compile:ts",
9-
"compile:proto": "mkdir -p ./dist && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=snakeToCamel=false --ts_proto_opt=stringEnums=true --ts_proto_opt=onlyTypes=true --ts_proto_opt=emitImportedFiles=false --proto_path=../ --proto_path=../../proto/ --ts_proto_out=./dist ../bens-proto/proto/bens.proto",
10-
"compile:ts": "tsc --declaration ./dist/bens-proto/proto/bens.ts"
9+
"compile:proto": "mkdir -p ./dist && protoc --plugin=./node_modules/.bin/protoc-gen-ts_proto --ts_proto_opt=exportCommonSymbols=false --ts_proto_opt=snakeToCamel=false --ts_proto_opt=stringEnums=true --ts_proto_opt=onlyTypes=true --ts_proto_opt=emitImportedFiles=false --proto_path=../bens-proto/proto --proto_path=../../proto/ --ts_proto_out=./dist ../bens-proto/proto/types.proto ../bens-proto/proto/domains_extractor.proto ../bens-proto/proto/multichain_domains.proto",
10+
"compile:ts": "tsc --declaration ./index.ts"
1111
},
1212
"repository": {
1313
"type": "git",

0 commit comments

Comments
 (0)