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

[IDEA]: Use a deps file for imports in config #139

Open
ebebbington opened this issue Sep 13, 2021 · 4 comments
Open

[IDEA]: Use a deps file for imports in config #139

ebebbington opened this issue Sep 13, 2021 · 4 comments
Labels
idea New idea for the project

Comments

@ebebbington
Copy link
Contributor

The Idea

Be great if the generated config file imports from a "./deps.ts" file, where nessie would also append the exports into the deps.ts file

And again, always happy to open a PR

@ebebbington ebebbington added the idea New idea for the project label Sep 13, 2021
@halvardssm
Copy link
Owner

Hey @ebebbington ! Thanks for sharing your idea! Could you expand a bit on what you imagine this to look like? Do you have some examples?

@ebebbington
Copy link
Contributor Author

Hey @ebebbington ! Thanks for sharing your idea! Could you expand a bit on what you imagine this to look like? Do you have some examples?

sorry for not getting back to you sooner, so the init command would not produce this:

// nessie.config.ts
import {
    ClientMySQL,
    ClientPostgreSQL,
    ClientSQLite,
    NessieConfig,
} from "https://deno.land/x/[email protected]/mod.ts";

and instead it would export those deps from a deps file, and import them from the config file:

// nessie.config.ts
import {
    ClientMySQL,
    ClientPostgreSQL,
    ClientSQLite,
    NessieConfig,
} from "./deps.ts";
// deps.ts - write to this file in append mode, to create it if it doesnt exist, or add to it if it does
export {
    ClientMySQL,
    ClientPostgreSQL,
    ClientSQLite,
    NessieConfig,
} from "https://deno.land/x/[email protected]/mod.ts";

@ebebbington
Copy link
Contributor Author

This will make dependency management much easier, saves the user having to move them into a deps file themselves

@halvardssm
Copy link
Owner

Hey! So, I don't think I want to provide this as an option as initializing Nessie is a one time thing, and it gives minimal return for the effort. In general, I don't think it is good to do this as everyone has their own way of structuring a repo, and it is better if they modify the files themselves. Nessie should be as standalone as possible, so you should be able to create a repo, do nessie init, and that should be it, no more files or adjustments. Nessie should also be easy to add to any repo in the sense that it should not alter existing files or make unexpected changes. I hope you understand what I want Nessie to be and act like 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea New idea for the project
Projects
None yet
Development

No branches or pull requests

2 participants