Skip to content

Commit

Permalink
🪲 (garnet_tool/internal.gleam) Fixed issue at generate glue code.
Browse files Browse the repository at this point in the history
Fixed an issue where an incorrect path was specified for `from` when generating glue code.
  • Loading branch information
Comamoca committed Sep 30, 2024
1 parent 87dea5a commit 24dcbdd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/garnet_tool/internal.gleam
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import gleam/string
import filepath

// Generate glue code.
pub fn generate_glue(modname: String) -> String {
let template =
["import { main } from './", modname, ".js'; main();"]
let modname_base = filepath.base_name(modname)
["import { main } from './", modname_base, ".js'; main();"]
|> string.concat
}

0 comments on commit 24dcbdd

Please sign in to comment.