Skip to content

Commit

Permalink
🔧 chore: Set up exports so you can access everything in the dist
Browse files Browse the repository at this point in the history
  • Loading branch information
fwestling committed Apr 15, 2024
1 parent a840d5c commit 98148a4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
5 changes: 5 additions & 0 deletions .changeset/wild-bags-rhyme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@first-australia/latitude-scheduler": patch
---

Add exports to build files
23 changes: 11 additions & 12 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,29 +2,28 @@ import Timeslot from "@/v8/timeslot/timeslot";
import Timetable from "@/v8/timetable/timetable";
import Tournament from "@/v8/tournament";

export function add(a: number, b: number): number {
return a + b;
}

export function subtract(a: number, b: number): number {
return a - b;
}
export * from "@/v8/activity";
export * from "@/v8/config";
export * from "@/v8/team";
export * from "@/v8/timeslot/timeslot";
export * from "@/v8/timetable/timetable";
export * from "@/v8/tournament";

console.log("Timetable test:");
const timetable = new Timetable();
for (let i = 0; i < 4; i++) {
timetable.timeslots.push(new Timeslot(9 * 60 + i * 45, 45, 4));
timetable.timeslots.push(new Timeslot(9 * 60 + i * 45, 45, 4));
}
timetable.print();

console.log("\nTournament test:");

// Initialise a tournament
const tournament = new Tournament({
name: "My Tournament",
numberOfDays: 1,
numberOfTeams: 24,
preset: "ausFLL",
name: "My Tournament",
numberOfDays: 1,
numberOfTeams: 24,
preset: "ausFLL",
});
tournament.construct();
tournament.populate();
Expand Down

0 comments on commit 98148a4

Please sign in to comment.