Skip to content

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

@rytswd

Description

@rytswd

๐Ÿ”ฎ 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions