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

[Feature Request]: Importer Update to handle improter-generated-from marker #62

Open
rytswd opened this issue Sep 30, 2021 · 1 comment
Labels
enhancement New feature or request

Comments

@rytswd
Copy link
Contributor

rytswd commented Sep 30, 2021

🔮 Relevant Command

importer update

🗂 Language Type

All

🔎 Request Details

With the recent update of #15 , improter-generated-from marker is added when using importer generate with --out flag.

Example:

$ importer generate template.md --out result.gen.md
$ cat result.gen.md
<!-- == improter-generated-from: template.md == -->
This is a generate demo

As shown above, the added marker holds onto which file was used to generate the given file, importer update can track back to the original file, and attempt to generate again.

This would be useful if importer generate is used to manage complex YAML files such as Kubernetes resources, and want to simply ensure all the files are up-to-date by running something like find . -name '*.md' -exec importer update {} \;.

It may be wiser to add a flag to enable/disable this feature - I'm not sure if it's better to have it turned on or off by default - having this feature is probably useful, but could be confusing if turned on by default.

@rytswd rytswd added the enhancement New feature or request label Sep 30, 2021
@rytswd
Copy link
Contributor Author

rytswd commented Oct 2, 2021

If we were to handle this, we would also need to remove Importer Marker of importer-skip-update when generating to a separate file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant