1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-29 03:19:54 +00:00

Change default module/path.

Disallow loading directly with extension to be more
consistent and keep things simpler.
This commit is contained in:
Calvin Rose 2019-06-19 00:29:05 -04:00
parent 9ba8728176
commit 264c5bc02b

View File

@ -1590,22 +1590,17 @@
from searching that path template if the filter doesn't match the input from searching that path template if the filter doesn't match the input
path. The filter can be a string or a predicate function, and path. The filter can be a string or a predicate function, and
is often a file extension, including the period." is often a file extension, including the period."
@[# Full or relative paths, including extensions @[# Relative to (dyn :current-file "./."). Path must start with .
[":all:" :native nati]
[":all:" :image ".jimage"]
[":all:" :source ".janet"]
# Relative to (dyn :current-file "./."). Path must start with .
[":cur:/:all:.janet" :source check-.] [":cur:/:all:.janet" :source check-.]
[":cur:/:all:/init.janet" :source check-.] [":cur:/:all:/init.janet" :source check-.]
[":cur:/:all:.jimage" :image check-.] [":cur:/:all:.jimage" :image check-.]
[(string ":cur:/:all:" nati) :native check-.] [(string ":cur:/:all:" nati) :native check-.]
# Relative to current dir (os/cwd) # As a path from (os/cwd)
["./:all:.janet" :source] [":all:.janet" :source]
["./:all:/init.janet" :source] [":all:/init.janet" :source]
["./:all:.jimage" :image] [":all:.jimage" :image]
[(string "./:all:" nati) :native] [(string ":all:" nati) :native]
# System paths # System paths
[":sys:/:all:.janet" :source] [":sys:/:all:.janet" :source]