1
0
mirror of https://github.com/janet-lang/janet synced 2024-11-25 09:47:17 +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
path. The filter can be a string or a predicate function, and
is often a file extension, including the period."
@[# Full or relative paths, including extensions
[":all:" :native nati]
[":all:" :image ".jimage"]
[":all:" :source ".janet"]
# Relative to (dyn :current-file "./."). Path must start with .
@[# Relative to (dyn :current-file "./."). Path must start with .
[":cur:/:all:.janet" :source check-.]
[":cur:/:all:/init.janet" :source check-.]
[":cur:/:all:.jimage" :image check-.]
[(string ":cur:/:all:" nati) :native check-.]
# Relative to current dir (os/cwd)
["./:all:.janet" :source]
["./:all:/init.janet" :source]
["./:all:.jimage" :image]
[(string "./:all:" nati) :native]
# As a path from (os/cwd)
[":all:.janet" :source]
[":all:/init.janet" :source]
[":all:.jimage" :image]
[(string ":all:" nati) :native]
# System paths
[":sys:/:all:.janet" :source]