Skip to content

Commit

Permalink
fix: export the protocl type also
Browse files Browse the repository at this point in the history
  • Loading branch information
pmespresso committed Apr 27, 2021
1 parent b7a6d73 commit 73528a1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion protocols/rally/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"isEnabled": false,
"hasOnchain": false,
"claim": {
"isClaimed": false,
"isClaimed": true,
"claimer": "",
"signature": ""
},
Expand Down
9 changes: 5 additions & 4 deletions scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ 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");
fs.writeFileSync(
"./dist/index.ts",
`
import { Protocol } from "../types";
export {
Protocol
}
export default [${protocolInfo.toString()}] as Protocol[];
`
`,
);

0 comments on commit 73528a1

Please sign in to comment.