Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-comment-annotation

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-comment-annotation

PostCSS plugin for annotating comments

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

PostCSS Comment Annotation Build Status

PostCSS plugin for annotating comments, inspired by and based on morishitter's CSS Annotation.

Install

npm install postcss-comment-annotation

Example

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"
  }
]

Usage

postcss([
  require('postcss-comment-annotation')({
    prefix: '@'
  })
])

Options

prefix

Takes string. Define the prefix to signify keys in your annotations. Default value: @.

Changelog

Keywords

FAQs

Package last updated on 10 Jul 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc