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

Infer config options from existing files #14

Open
elwayman02 opened this issue May 6, 2020 · 1 comment
Open

Infer config options from existing files #14

elwayman02 opened this issue May 6, 2020 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@elwayman02
Copy link
Contributor

When generating a new field-guide, the default config for name, copyright, and github could all be inferred from existing files in the project. For example, the default name can be read from the name property in package.json, the github property can come from repository in package.json, and copyright could be pulled from COPYRIGHT.md. Instead of providing defaults we know will have to be changed, we could proactively provide intelligent defaults that may not need changing!

@mansona
Copy link
Member

mansona commented May 6, 2020

That's a great idea 🎉

The right place to implement this is in the blueprint index: https://github.com/empress/field-guide/blob/master/blueprints/field-guide/index.js#L43

I think it would be worthwhile just assuming that the files you're talking are available in process.cwd() but we should fall back sensibly if they are missing for some reason i.e. if the smart behaviour fails for whatever reason we have the same functionality as today 👍

@mansona mansona added the help wanted Extra attention is needed label May 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants