You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ghost already supports importing modules using the following syntax:
import{Example}from'example'
Adding an import function variant would allow developers to dynamically load in and assign values during runtime. For example, it would be possible to scan and auto-import a directory of ghost files:
files=scanDirectory('config')for(fileinfiles){constconfig=import(file)// do something with "config"}
This would re-use the existing import keyword but would be invoked as a function.
The text was updated successfully, but these errors were encountered:
Ghost already supports importing modules using the following syntax:
Adding an
import
function variant would allow developers to dynamically load in and assign values during runtime. For example, it would be possible to scan and auto-import a directory of ghost files:This would re-use the existing
import
keyword but would be invoked as a function.The text was updated successfully, but these errors were encountered: