Skip to content

make exported stuffs available in other scripts #17

@doongjohn

Description

@doongjohn
proc exportedHi = echo "hi"
exportTo(
  moduleName,
  exportedHi
)
const addins = implNimScriptModule(moduleName)
var intr = loadScript(
  script = NimScriptPath "./main.nims",
  addins = addins
)
# main.nims
import "./helper.nims"
hi()
# helper.nims
proc hi = exportedHi() # <-- error: this proc is unavailable

I want to make a nimscript helper module but I can't use the exported procs
I can use include instead but I want to avoid that.

Is there any way to achieve this?
or do you know a better way to make a helper nimscript?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions