Skip to content

Commit

Permalink
fix: index.ts is sorted now
Browse files Browse the repository at this point in the history
Signed-off-by: Martichou <m@rtin.fyi>
  • Loading branch information
Martichou committed Jun 8, 2024
1 parent 3ae1396 commit 42c84d2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
14 changes: 7 additions & 7 deletions core_lib/bindings/index.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
export * from "./OutboundPayload"
export * from "./ChannelAction"
export * from "./ChannelDirection"
export * from "./ChannelMessage"
export * from "./SendInfo"
export * from "./TransferType"
export * from "./DeviceType"
export * from "./EndpointInfo"
export * from "./OutboundPayload"
export * from "./RemoteDeviceInfo"
export * from "./DeviceType"
export * from "./ChannelDirection"
export * from "./TransferMetadata"
export * from "./ChannelAction"
export * from "./SendInfo"
export * from "./State"
export * from "./TransferMetadata"
export * from "./TransferType"
export * from "./Visibility"
4 changes: 3 additions & 1 deletion core_lib/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fn main() {
)
.unwrap();

let exports: Vec<_> = fs::read_dir("./bindings")
let mut exports: Vec<_> = fs::read_dir("./bindings")
.unwrap()
.filter_map(Result::ok)
.filter_map(|p| {
Expand All @@ -30,6 +30,8 @@ fn main() {
.filter(|f| f != "index")
.map(|f| format!("export * from \"./{}\"", f))
.collect();
// Sort it to avoid having the index.ts being different for no reason
exports.sort();

let mut file = File::create("./bindings/index.ts").unwrap();
file.write_all(exports.join("\n").as_bytes()).unwrap();
Expand Down

0 comments on commit 42c84d2

Please # to comment.