Packages folder
The packages folder holds only code that must be code, shared across the Studio's Startups as pnpm packages.
| Property | Value |
|---|---|
| Path | packages/ |
| Holds | Implementation |
| Kind | folder |
| Leaders | git-first |
| Team | Engineering Team |
| Written by | Change.merge |
| Compiled by | SoftwareBuilder |
Example
packages/ in a Startup repository.
/** The nth business day of a month, skipping weekends. */
export function businessDay(year: number, month: number, n: number): Date {
const day = new Date(Date.UTC(year, month, 1))
let count = 0
while (true) {
const weekday = day.getUTCDay()
if (weekday !== 0 && weekday !== 6 && ++count === n) return day
day.setUTCDate(day.getUTCDate() + 1)
}
}Generates
SoftwareBuilder compiles it into these records, Verbs and routes.
| Kind | What |
|---|---|
| Records | Implementation |
| Verbs | None. |
| Routes | None. |