Skip to content

Commit

Permalink
update typescript example
Browse files Browse the repository at this point in the history
  • Loading branch information
Aylur committed Jan 14, 2024
1 parent 5cb4aae commit 96c4ca9
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions src/content/docs/config/type-checking.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,16 @@ import { execAsync } from 'resource:///com/github/Aylur/ags/utils.js'
const entry = App.configDir + '/ts/main.ts'
const outdir = '/tmp/ags/js'

await execAsync([
'bun', 'build', entry,
'--outdir', outdir,
'--external', '*',
])
try {
await execAsync([
'bun', 'build', entry,
'--outdir', outdir,
'--external', 'resource://*',
'--external', 'gi://*',
])
} catch (error) {
console.error(error)
}

const main = await import(`file://${outdir}/main.js`)

Expand All @@ -71,4 +76,3 @@ export default {
windows: [Bar(0)]
}
```

0 comments on commit 96c4ca9

Please sign in to comment.