-
Notifications
You must be signed in to change notification settings - Fork 620
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
proposal: config module #4382
Comments
I should also mention that I have this implemented with 100% test coverage. (I'm aware that coverage isn't the end-all be-all, but it's better than having 0% coverage.) Let me know if I should open a PR for this. |
What if we add a |
@iuioiua I agree with you here, but wouldn't it make more sense to add such a type to the global |
That would mean only Deno programs have access to it. Having it in the Standard Library allows its use in other runtimes. |
@iuioiua this seems like outsourcing to me. Correct me if I'm wrong, but I don't think the type definition is relevant outside of Deno, at least not that I can think of a valid use case for it. 2 more reasons to keep it in the same codebase as the runtime itself:
|
On second thought, yes, maybe having this in the runtime is better. Closing in favor of denoland/deno#24628. |
@iuioiua, this is the followup to denoland/fresh#2266 (comment).
I propose we introduce a type for the
deno.json
schema. I have a generator like this:Maybe this type already exists, but I couldn't find it.
Additionally, there should be a suite of utilities for interacting with this configuration file. I propose two functions to start with:
readConfig
-- This should read a path and parse the config file, handling a few things:a. Look for both
deno.json
anddeno.jsonc
files.b. Possibly look in parent directories, mimicking whatever the cli does in order to find the governing file.
importMap
-- Return the relevant imports asRecord<string, string>
. This should handle both inlineimports
and alsoimportMap
.The text was updated successfully, but these errors were encountered: