salesforce-ux/theo

Allow for top-level file comments

bradryanbice opened this issue · 3 comments

A file generated by Theo can't have documentation comments (as far as I know.)

Maybe institute a comments key in the global area, like so?

global:
  category: 'web'
  type: 'color'
  comments: 'This would be a commented out line that would appear at the top of the file.'

Right now this is not supported. The global property is merged into each token, so we'd need to figure out some other way. Since token files are ultimately all flattened together when imported, maybe this could be an option that get's passed in when calling theo.convert().

How about the following format:

example.yml

meta: 
  name: "optional name"
  description: "comment or multiline comment here"

This way in the output file, when set it would get separators of each file section based on whether the meta info has been filled in or not.

My specific use case would be to set a comment in the first base SCSS file to notify users that it's a generated file and should not edit directly.

Thoughts?

Hello! We have some status update for this enhancement? Thanks!