fix: export the protocl type also

This commit is contained in:
yj 2021-04-27 11:04:57 -05:00
parent b7a6d73768
commit 73528a159a
2 changed files with 6 additions and 5 deletions

View File

@ -12,7 +12,7 @@
"isEnabled": false,
"hasOnchain": false,
"claim": {
"isClaimed": false,
"isClaimed": true,
"claimer": "",
"signature": ""
},

View File

@ -3,9 +3,7 @@ import mkdirp from "mkdirp";
const protocols = fs.readdirSync("./protocols");
const protocolInfo = protocols.map((protocol) =>
fs.readFileSync(`./protocols/${protocol}/index.json`, "utf8")
);
const protocolInfo = protocols.map((protocol) => fs.readFileSync(`./protocols/${protocol}/index.json`, "utf8"));
mkdirp.sync("./dist");
fs.copyFileSync("./types.ts", "./dist/types.ts");
@ -13,7 +11,10 @@ fs.writeFileSync(
"./dist/index.ts",
`
import { Protocol } from "../types";
export {
Protocol
}
export default [${protocolInfo.toString()}] as Protocol[];
`
`,
);