Support adding copyright headers for files when they're not transpiled
Is there a way to generate copyright headers for JS files, but only when they don't have a corresponding TS file (and thus aren't transpiled).
Didn't notice any kind of conditional copyright header generation support in the docs.
The closest thing would be to make use of the excludeGlob setting under changes-tracking which will allow you to ignore based on location and/or file type. But I am interested...given that the extension will only deal with headers on files that are manually edited, does this imply that you are editing the outputted JS files that are generated via the transpiling?
Regards D
well fair. This wouldn't be a typical workflow. I'm just copying over some logic that exists in a Visual Studio extension into a VSCode extension and thought I could just use this existing VSCode extension instead.
This conditional bit was some logic that existed in the VS extension that can't really be achieved with this extenion as far as I can tell (We might have some JS files in a directory that are transpiled and some in the same directory that aren't, so can't really use this excludeGlob approach)
Maybe not something I need to worry about though in practice, since people shouldn't be editing those files. It would just be annoying if they went into the file to check out the output and saved, and a copyright header got inserted for no reason.
I understand.
It is worth noting that the header will not be added unless the file content has been edited - i.e. saving a clean file will not trigger a header change.
You can also set the enforceHeader setting in changes-tracking to false to ensure that headers are not automatically inserted into existing (i.e. pre-saved) files. Users can still add headers manually to existing files if needed via the keyboard shortcut defined in the help, and creating new files in VSC will still add the header.
regards D