PostCSS plugin for annotating comments, inspired by and based on morishitter's CSS Annotation.
npm install postcss-comment-annotation
Annotate your CSS with key/value pairs. Keys without a defined value
results in a value of true.
/*
@define Foo
@description
Foo is a base component
*/
.foo { }
/*
@define Bar
@parent Foo
@modifier
@description
Bar modifies Foo
*/
.foo-bar { }Outputs an array to result.commentAnnotations.
[
  {
    "define": "Foo",
    "description": "Foo is a base component"
  }, {
    "define": "Bar",
    "parent": "Foo",
    "modifier": true,
    "description": "Bar modifies Foo"
  }
]postcss([
  require('postcss-comment-annotation')({
    prefix: '@'
  })
])Takes string.
Define the prefix to signify keys in your annotations.
Default value: @.