moban icon indicating copy to clipboard operation
moban copied to clipboard

Output target name deprecation

Open jayvdb opened this issue 6 years ago • 0 comments

Extending on https://github.com/moremoban/moban/issues/167, in addition to handling renames, it would be very nice to allow managed deprecation of target names. e.g.

targets:
  - output: foo
    template: bar/foo.jj2
    deprecated_output_names: bar  # will be used if present, with warning
    removed_output_names: baz  # will be deleted if present

The other half of this would be foo.jj2

{% if __target__ == 'foo' %}
// emit new format
{% else %}
// emit old format
{% endif %}

e.g. this could be used to manage the transition from .eslint.json to .eslint.yaml, allowing managed repos to not immediately switch formats, which may be necessary because they find bugs in the new template, or that the generated output file has a negative effect.

jayvdb avatar Jan 16 '19 04:01 jayvdb