Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remote Goatfile Imports #27

Open
zekroTJA opened this issue Apr 21, 2023 · 0 comments
Open

Remote Goatfile Imports #27

zekroTJA opened this issue Apr 21, 2023 · 0 comments
Labels
enhancement New feature or request proposal

Comments

@zekroTJA
Copy link
Member

zekroTJA commented Apr 21, 2023

Allow importing Goatfiles via the use statement from remote locations (inspired by deno's remote imports). This would allow centralizing Goatfiles on internal or external web servers.

Example:

use https://gist.githubusercontent.com/zekroTJA/somegistid/raw/somefileid/login.goat

It should also be possible to fingerprint remote imports with a hash. Example:

use https://gist.githubusercontent.com/zekroTJA/somegistid/raw/somefileid/login.goat@md5:5eb63bbbe01eeed093cb22bb8f5acdc3

This feature also opens some dicussion questions like how should relative imports in remote Goatfiles be handled?

Example:

https://gist.githubusercontent.com/zekroTJA/somegistid/raw/somefileid/index.goat

use ./login.goat

I think, in this case, the use ./login.goat should resolve to https://gist.githubusercontent.com/zekroTJA/somegistid/raw/somefileid/login.goat.

When a fingerprinted remote Goatfile is specified, imports inside these should be disallowed or must also be fingerprinted.

@zekroTJA zekroTJA added enhancement New feature or request proposal labels Apr 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal
Projects
None yet
Development

No branches or pull requests

1 participant